Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-users] How to pass user context object to the response callback of async Jetty HTTP client?

Hi,

On Sun, Jul 2, 2017 at 4:34 PM, Alexander Farber
<alexander.farber@xxxxxxxxx> wrote:
> Good afternoon,
>
> is there please a way to pass a custom object to the async HttpClient
> request - and then retrieve that object back in the response callback?
>
> Currently my workaround is to set custom headers (like "X-token: ", "X-uid:
> ") in the request, and then retrieve them in the BufferingResponseListener,
> but I would prefer to have a cleaner method, without exposing my data as
> headers.
>
> Here is more to the background of my problem -
> https://stackoverflow.com/questions/44870396/how-to-pass-user-context-object-to-the-response-callback-of-async-jetty-http-cli

Answered there.

-- 
Simone Bordet
----
http://cometd.org
http://webtide.com
Developer advice, training, services and support
from the Jetty & CometD experts.


Back to the top