On Thu, 2018-04-05 at 14:25 +0000, Mark A. Claassen wrote:
> Thanks, that was what I was looking for. However, a few things...
> First, it seems the arguments have changed a bit since that was
> written.
>
> I fixed this by creating a HttpContext with : HttpContext context =
> HttpClientContext.create();
> I then created a quick CallbackHandler for testing:
> FutureCallback<MyHandler> callback = new
> FutureCallback<MyHandler>() {
> @Override
> public void completed(MyHandler t) {
> System.err.println("Here: completed");
> }
> @Override
> public void failed(Exception excptn) {
> System.err.println("Here: failed");
> excptn.printStackTrace();
> }
> @Override
> public void cancelled() {
> System.err.println("cancelled");
> }
> };
>
> Second, I get an error. I think the problem is in
> MinimalHttpAsyncClient on line 229. It creates the HttpHost, but
> there is no opportunity to send in a port. This results in:
>
> at org.apache.hc.core5.util.Args.notNegative(Args.java:124)
> at
> org.apache.hc.client5.http.HttpRoute.<init>(HttpRoute.java:75)
> at
> org.apache.hc.client5.http.HttpRoute.<init>(HttpRoute.java:154)
> at
> org.apache.hc.client5.http.impl.async.MinimalHttpAsyncClient.leaseEnd
> point(MinimalHttpAsyncClient.java:115)
> at
> org.apache.hc.client5.http.impl.async.MinimalHttpAsyncClient.access$2
> 00(MinimalHttpAsyncClient.java:76)
> at
> org.apache.hc.client5.http.impl.async.MinimalHttpAsyncClient$4.sendRe
> quest(MinimalHttpAsyncClient.java:231)
> at
> org.apache.hc.core5.http.nio.BasicRequestProducer.sendRequest(BasicRe
> questProducer.java:65)
>
Hi Mark
Yes, things still keep on changing though I am trying to not make any
large API visible changes anymore.
Please do try the latest snapshot from master instead of 5.0-beta1
https://github.com/apache/httpcomponents-client
Oleg
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]