== Introduction


This client sends large HTTP data streams to a server to test its ability to handle large data requests.


== Prepare the request 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 file.
You can change the parameters `bs` and `count` to configure the data size.


== Send a request

Use `curl` to send a request:

	curl -v -X PUT -H "Content-Type: multipart/form-data" -F "data=@./input" http://localhost:8080/test

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

	curl -v -X PUT -H "Content-Type: multipart/form-data" -F "data=@./input" http://localhost:9000/test

== OpenShift

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 -X PUT -H "Content-Type: multipart/form-data" -F "data=@./input" <backend-server-route>/test

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

    curl -v -X PUT -H "Content-Type: multipart/form-data" -F "data=@./input" <proxy-server-route>/test

To check that `output` file was sent to the backend server pod:

. List your pods:

    oc get pods

. Connect to the backend server pod:

    oc rsh <pod-name>

. Inside the pod, check the `output` file in the `/deployments/client/` directory.

== 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.