Skip to main content

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

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

Best regards
Alex

Back to the top