public class DefaultHttpRequest extends DefaultHttpMessage implements HttpRequest
HttpRequest
implementation.构造器和说明 |
---|
DefaultHttpRequest(HttpVersion httpVersion,
HttpMethod method,
java.lang.String uri)
Creates a new instance.
|
DefaultHttpRequest(HttpVersion httpVersion,
HttpMethod method,
java.lang.String uri,
boolean validateHeaders)
已过时。
Prefer the
DefaultHttpRequest(HttpVersion, HttpMethod, String) constructor instead,
to always have header validation enabled. |
DefaultHttpRequest(HttpVersion httpVersion,
HttpMethod method,
java.lang.String uri,
HttpHeaders headers)
Creates a new instance.
|
DefaultHttpRequest(HttpVersion httpVersion,
HttpMethod method,
java.lang.String uri,
HttpHeadersFactory headersFactory)
Creates a new instance.
|
限定符和类型 | 方法和说明 |
---|---|
boolean |
equals(java.lang.Object o) |
HttpMethod |
getMethod()
已过时。
|
java.lang.String |
getUri()
已过时。
|
int |
hashCode() |
HttpMethod |
method()
Returns the
HttpMethod of this HttpRequest . |
HttpRequest |
setMethod(HttpMethod method)
Set the
HttpMethod of this HttpRequest . |
HttpRequest |
setProtocolVersion(HttpVersion version)
Set the protocol version of this
HttpMessage |
HttpRequest |
setUri(java.lang.String uri)
Set the requested URI (or alternatively, path)
|
java.lang.String |
toString() |
java.lang.String |
uri()
Returns the requested URI (or alternatively, path)
|
getProtocolVersion, headers, protocolVersion
decoderResult, getDecoderResult, setDecoderResult
getProtocolVersion, headers, protocolVersion
getDecoderResult
decoderResult, setDecoderResult
public DefaultHttpRequest(HttpVersion httpVersion, HttpMethod method, java.lang.String uri)
httpVersion
- the HTTP version of the requestmethod
- the HTTP method of the requesturi
- the URI or path of the request@Deprecated public DefaultHttpRequest(HttpVersion httpVersion, HttpMethod method, java.lang.String uri, boolean validateHeaders)
DefaultHttpRequest(HttpVersion, HttpMethod, String)
constructor instead,
to always have header validation enabled.httpVersion
- the HTTP version of the requestmethod
- the HTTP method of the requesturi
- the URI or path of the requestvalidateHeaders
- validate the header names and values when adding them to the HttpHeaders
public DefaultHttpRequest(HttpVersion httpVersion, HttpMethod method, java.lang.String uri, HttpHeadersFactory headersFactory)
httpVersion
- the HTTP version of the requestmethod
- the HTTP method of the requesturi
- the URI or path of the requestheadersFactory
- the HttpHeadersFactory
used to create the headers for this Request.
The recommended default is DefaultHttpHeadersFactory.headersFactory()
.public DefaultHttpRequest(HttpVersion httpVersion, HttpMethod method, java.lang.String uri, HttpHeaders headers)
httpVersion
- the HTTP version of the requestmethod
- the HTTP method of the requesturi
- the URI or path of the requestheaders
- the Headers for this Request@Deprecated public HttpMethod getMethod()
getMethod
在接口中 HttpRequest
public HttpMethod method()
HttpRequest
HttpMethod
of this HttpRequest
.method
在接口中 HttpRequest
HttpMethod
of this HttpRequest
@Deprecated public java.lang.String getUri()
getUri
在接口中 HttpRequest
public java.lang.String uri()
HttpRequest
uri
在接口中 HttpRequest
public HttpRequest setMethod(HttpMethod method)
HttpRequest
HttpMethod
of this HttpRequest
.setMethod
在接口中 HttpRequest
public HttpRequest setUri(java.lang.String uri)
HttpRequest
setUri
在接口中 HttpRequest
public HttpRequest setProtocolVersion(HttpVersion version)
HttpMessage
HttpMessage
setProtocolVersion
在接口中 HttpMessage
setProtocolVersion
在接口中 HttpRequest
setProtocolVersion
在类中 DefaultHttpMessage
public int hashCode()
hashCode
在类中 DefaultHttpMessage
public boolean equals(java.lang.Object o)
equals
在类中 DefaultHttpMessage
public java.lang.String toString()
toString
在类中 java.lang.Object