Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 6852D200B43 for ; Tue, 19 Jul 2016 17:28:22 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 6730E160A5C; Tue, 19 Jul 2016 15:28:22 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id DDAAF160A8C for ; Tue, 19 Jul 2016 17:28:21 +0200 (CEST) Received: (qmail 45640 invoked by uid 500); 19 Jul 2016 15:28:21 -0000 Mailing-List: contact dev-help@hc.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "HttpComponents Project" Delivered-To: mailing list dev@hc.apache.org Received: (qmail 45509 invoked by uid 99); 19 Jul 2016 15:28:20 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 19 Jul 2016 15:28:20 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id A72DC2C0D5F for ; Tue, 19 Jul 2016 15:28:20 +0000 (UTC) Date: Tue, 19 Jul 2016 15:28:20 +0000 (UTC) From: "Tobias Oberlies (JIRA)" To: dev@hc.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (HTTPCLIENT-1757) Make request available to ResponseHandlers MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Tue, 19 Jul 2016 15:28:22 -0000 Tobias Oberlies created HTTPCLIENT-1757: ------------------------------------------- Summary: 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 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.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org For additional commands, e-mail: dev-help@hc.apache.org