This just tests out using Jax-RS to create an async proxy using Completable Futures.
This uses the Java 8 Rx Client extension to create the completable future directly. This is covered in the documentation here.
Currently to avoid the chunked encoding error the Transfer-Encoding header is dropped. This error manifests itself in curl with the following error:
➜ curl http://localhost:8080/foo -v
...
* Illegal or missing hexadecimal sequence in chunked-encoding
* Closing connection 0
This is always GET at the moment.
This isn't being copied at the moment.
When performing a proxy for the request:
curl http://localhost:8080/foo
The following message appears in the logs:
Attempt to send restricted header(s) while the [sun.net.http.allowRestrictedHeaders] system property not set. Header(s) will possibly be ignored.