== Introduction

This client sends a download request via HTTP (empty request). The server is expected to send back a large data stream. We want to test the server's ability to handle large data responses.


== Prepare the response data

The server will read and stream back the response data.
In the client folder create a large file by running the following command:

	dd if=/dev/zero of=input bs=4M count=1024


The command above creates a 4 Gigabytes (input) file in the `client` directory.
You can change the parameters `bs` and `count` to configure the data size.


== Send a request

Use `curl` to send a request:

	curl -v -o ./output http://localhost:8080/test

If you're using the SpringBoot proxy, use the proxy port:

	curl -v -o ./output http://localhost:9000/test

== OpenShift

Before sending a request, make sure that the input file is created inside the backend server pod.

. List your pods:

    oc get pods

. Connect to the backend server pod:

    oc rsh <pod-name>

. Inside the pod, create `input` file in the `/deployments/client/` directory.

To get the external routes for your services, use:

    oc get route

This will show you the routes for both the backend and proxy servers. Use these routes instead of `localhost` when testing with `curl`.

=== Send a request using `curl`

If you're calling the *backend server* directly:

    curl -v -o ./output <backend-server-route>/test

If you're using the *Spring Boot proxy server*:

    curl -v -o ./output <proxy-server-route>/test

== Inspect the response

If the request was successful, curl should have written the response data locally.

Check the `output` file size equals the `input` file.


== Clean the data

When you're done, make sure you perform the following actions:
 
1) Delete the large sample data file to clean your filesystem.

2) Delete the output file generated by Camel.