BasicHttpRequestpublic class BasicHttpRequest extends AbstractHttpMessage implements HttpRequestBasic implementation of an HTTP request that can be modified. |
Fields Summary |
---|
private final RequestLine | requestline | private final String | method | private final String | uri |
Constructors Summary |
---|
public BasicHttpRequest(String method, String uri)
super();
if (method == null) {
throw new IllegalArgumentException("Method name may not be null");
}
if (uri == null) {
throw new IllegalArgumentException("Request URI may not be null");
}
this.method = method;
this.uri = uri;
this.requestline = null;
| public BasicHttpRequest(String method, String uri, ProtocolVersion ver)
this(new BasicRequestLine(method, uri, ver));
| public BasicHttpRequest(RequestLine requestline)
super();
if (requestline == null) {
throw new IllegalArgumentException("Request line may not be null");
}
this.requestline = requestline;
this.method = requestline.getMethod();
this.uri = requestline.getUri();
|
Methods Summary |
---|
public org.apache.http.ProtocolVersion | getProtocolVersion()
if (this.requestline != null) {
return this.requestline.getProtocolVersion();
} else {
return HttpProtocolParams.getVersion(getParams());
}
| public org.apache.http.RequestLine | getRequestLine()
if (this.requestline != null) {
return this.requestline;
} else {
ProtocolVersion ver = HttpProtocolParams.getVersion(getParams());
return new BasicRequestLine(this.method, this.uri, ver);
}
|
|