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
1 changed files with 13 additions and 1 deletions

View File

@ -50,7 +50,7 @@ import org.apache.http.protocol.HTTP;
*/
@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 class HttpRequestWrapper extends AbstractHttpMessage implements HttpReque
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) {