public class DefaultHttpRequest extends DefaultHttpMessage implements HttpRequest
HttpRequest implementation.| Constructor and Description | 
|---|
DefaultHttpRequest(HttpVersion httpVersion,
                  HttpMethod method,
                  String uri)
Creates a new instance. 
 | 
DefaultHttpRequest(HttpVersion httpVersion,
                  HttpMethod method,
                  String uri,
                  boolean validateHeaders)
Deprecated. 
 
Prefer the  
DefaultHttpRequest(HttpVersion, HttpMethod, String) constructor instead,
 to always have header validation enabled. | 
DefaultHttpRequest(HttpVersion httpVersion,
                  HttpMethod method,
                  String uri,
                  HttpHeaders headers)
Creates a new instance. 
 | 
DefaultHttpRequest(HttpVersion httpVersion,
                  HttpMethod method,
                  String uri,
                  HttpHeadersFactory headersFactory)
Creates a new instance. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
boolean | 
equals(Object o)  | 
HttpMethod | 
getMethod()
Deprecated.  
 | 
String | 
getUri()
Deprecated.  
 | 
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(String uri)
Set the requested URI (or alternatively, path) 
 | 
String | 
toString()  | 
String | 
uri()
Returns the requested URI (or alternatively, path) 
 | 
getProtocolVersion, headers, protocolVersiondecoderResult, getDecoderResult, setDecoderResultclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetProtocolVersion, headers, protocolVersiongetDecoderResultdecoderResult, setDecoderResultpublic DefaultHttpRequest(HttpVersion httpVersion, HttpMethod method, 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, 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 HttpHeaderspublic DefaultHttpRequest(HttpVersion httpVersion, HttpMethod method, 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, 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 in interface HttpRequestpublic HttpMethod method()
HttpRequestHttpMethod of this HttpRequest.method in interface HttpRequestHttpMethod of this HttpRequest@Deprecated public String getUri()
getUri in interface HttpRequestpublic String uri()
HttpRequesturi in interface HttpRequestpublic HttpRequest setMethod(HttpMethod method)
HttpRequestHttpMethod of this HttpRequest.setMethod in interface HttpRequestpublic HttpRequest setUri(String uri)
HttpRequestsetUri in interface HttpRequestpublic HttpRequest setProtocolVersion(HttpVersion version)
HttpMessageHttpMessagesetProtocolVersion in interface HttpMessagesetProtocolVersion in interface HttpRequestsetProtocolVersion in class DefaultHttpMessagepublic int hashCode()
hashCode in class DefaultHttpMessagepublic boolean equals(Object o)
equals in class DefaultHttpMessageCopyright © 2008–2025 The Netty Project. All rights reserved.