You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by "Oleg Kalnichevski (JIRA)" <ji...@apache.org> on 2017/06/15 13:40:00 UTC

[jira] [Resolved] (HTTPCORE-459) Make request available to ResponseHandlers

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

Oleg Kalnichevski resolved HTTPCORE-459.
----------------------------------------
       Resolution: Not A Problem
    Fix Version/s:     (was: 5.0-alpha4)

> Make request available to ResponseHandlers
> ------------------------------------------
>
>                 Key: HTTPCORE-459
>                 URL: https://issues.apache.org/jira/browse/HTTPCORE-459
>             Project: HttpComponents HttpCore
>          Issue Type: Improvement
>    Affects Versions: 5.0-alpha3
>            Reporter: Tobias Oberlies
>
> 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
(v6.4.14#64029)

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