Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
ndr-brt committed Aug 31, 2023
1 parent 448a7ee commit 38425be
Show file tree
Hide file tree
Showing 9 changed files with 14 additions and 218 deletions.
3 changes: 0 additions & 3 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,7 @@ include(":transfer:transfer-05-file-transfer-cloud:cloud-transfer-provider")
include(":transfer:transfer-05-file-transfer-cloud:transfer-file-cloud")

include("transfer:transfer-06-consumer-pull-http:http-pull-connector")
include("transfer:transfer-06-consumer-pull-http:consumer-pull-backend-service")

include("transfer:transfer-07-provider-push-http:http-push-connector")
include("transfer:transfer-07-provider-push-http:provider-push-http-backend-service")

include("transfer:streaming:streaming-01-http-to-http:streaming-01-runtime")

Expand Down
19 changes: 8 additions & 11 deletions transfer/transfer-06-consumer-pull-http/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -427,11 +427,12 @@ Sample output:

### 9. Start the transfer

As a pre-requisite, you need to have a backend service that runs on port 4000
As a pre-requisite, you need to have an http server that runs on port 4000 and logs all the incoming requests, it will
be mandatory to get the EndpointDataReference that will be used to get the data.

```bash
./gradlew transfer:transfer-06-consumer-pull-http:consumer-pull-backend-service:build
java -jar transfer/transfer-06-consumer-pull-http/consumer-pull-backend-service/build/libs/consumer-pull-backend-service.jar
./gradlew util:http-request-logger:build
HTTP_SERVER_PORT=4000 java -jar util/http-request-logger/build/libs/http-request-logger.jar
```

Now that we have a contract agreement, we can finally request the file. In the request body, we need
Expand Down Expand Up @@ -502,10 +503,8 @@ You should see the Transfer Process in `COMPLETED` state:

### 11. Pull the data

At this step, if you look at the backend service logs, you will have a json representing
the data useful for reading the data. This is presented in the following section.

Sample log for the Backend Service:
At this step, if you look at the http server logs, you will find a json representing the EndpointDataReference, needed
to get the data from the provider:

```json
{
Expand All @@ -523,8 +522,7 @@ Once this json is read, use a tool like postman or curl to execute the following
data

```bash
curl --location --request GET 'http://localhost:29291/public/' \
--header 'Authorization: <auth code>'
curl --location --request GET 'http://localhost:29291/public/' --header 'Authorization: <auth code>'
```

At the end, and to be sure that you correctly achieved the pull, you can check if the data you get
Expand All @@ -534,8 +532,7 @@ is the same as the one you can get at https://jsonplaceholder.typicode.com/users
Since we configured the `HttpData` with `proxyPath`, we could also ask for a specific user with:

```bash
curl --location --request GET 'http://localhost:29291/public/1' \
--header 'Authorization: <auth code>'
curl --location --request GET 'http://localhost:29291/public/1' --header 'Authorization: <auth code>'
```

And the data returned will be the same as in https://jsonplaceholder.typicode.com/users/1

This file was deleted.

This file was deleted.

This file was deleted.

12 changes: 6 additions & 6 deletions transfer/transfer-07-provider-push-http/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -377,11 +377,12 @@ Sample output:

### 8. Start the transfer

As a pre-requisite, you need to have a backend service that runs on port 4000
As a pre-requisite, you need to have an http server that runs on port 4000 and logs all the incoming requests, it will
be mandatory to get the data from the provider.

```bash
./gradlew transfer:transfer-07-provider-push-http:provider-push-http-backend-service:build
java -jar transfer/transfer-07-provider-push-http/provider-push-http-backend-service/build/libs/provider-push-http-backend-service.jar
./gradlew util:http-request-logger:build
HTTP_SERVER_PORT=4000 java -jar util/http-request-logger/build/libs/http-request-logger.jar
```

Now that we have a contract agreement, we can finally request the file. In the request body, we need
Expand Down Expand Up @@ -440,6 +441,5 @@ curl http://localhost:29193/management/v2/transferprocesses/<transfer process id

### 10. Check the data

At this step, you can check the data by checking the log of backend service
At the end, and to be sure that you correctly achieved the pull, you can check if the data you get
is the same as the one you can get at https://jsonplaceholder.typicode.com/users
At this step, you can check the data by checking the log of the http server exposed on port 4000, you should see a log
that shows the same data that you can get from https://jsonplaceholder.typicode.com/users

This file was deleted.

This file was deleted.

This file was deleted.

0 comments on commit 38425be

Please sign in to comment.