HTTPCLIENT-1355: HttpRequestWrapper to implement HttpUriRequest

Contributed by James Leigh <james at 3roundstones.com>

git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1486407 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Oleg Kalnichevski 2013-05-26 10:59:48 +00:00
parent 6a58c84b03
commit 68a101475a

View File

@ -50,7 +50,7 @@
*/
@SuppressWarnings("deprecation")
@NotThreadSafe
public class HttpRequestWrapper extends AbstractHttpMessage implements HttpRequest {
public class HttpRequestWrapper extends AbstractHttpMessage implements HttpUriRequest {
private final HttpRequest original;
private final String method;
@ -86,6 +86,18 @@ public void setURI(final URI uri) {
this.uri = uri;
}
public String getMethod() {
return method;
}
public void abort() throws UnsupportedOperationException {
throw new UnsupportedOperationException();
}
public boolean isAborted() {
return false;
}
public RequestLine getRequestLine() {
String requestUri = null;
if (this.uri != null) {