hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Oleg Kalnichevski (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (HTTPCLIENT-1757) Make request available to ResponseHandlers
Date Wed, 20 Jul 2016 09:00:29 GMT

     [ https://issues.apache.org/jira/browse/HTTPCLIENT-1757?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel

Oleg Kalnichevski updated HTTPCLIENT-1757:
    Fix Version/s: 5.0 Alpha2

One way to address the problem is to make {{ResponseHandler}} aware of its execution context
by passing {{HttpContext}} as a parameter.


> Make request available to ResponseHandlers
> ------------------------------------------
>                 Key: HTTPCLIENT-1757
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1757
>             Project: HttpComponents HttpClient
>          Issue Type: Improvement
>          Components: HttpClient
>    Affects Versions: 4.5.2
>            Reporter: Tobias Oberlies
>             Fix For: 5.0 Alpha2
> We use HttpClients for a system test of a REST API. We are using ResponseHandlers to
directly convert the response entity to a data structure that is suitable for assertions.
> This works very well, except for the occasional case where the system under test responds
with an unexpected status code. In this case, the response handler throws an exception. For
a good error message, it would be useful to also include the request URL. However the request
object is not available in the ResponseHandler.handleResponse method.
> So this is a request to also make the HttpRequest object available in the ResponseHandler.handleResponse
method. This could be done by adding a getter in the HttpResponse class, or by creating a
new interface (e.g. HttpResponseHandler2) with a two-parameter handleResponse method.

This message was sent by Atlassian JIRA

To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org

View raw message