- java.lang.Object
-
- io.netty5.handler.codec.http.DefaultHttpObject
-
- io.netty5.handler.codec.http.DefaultHttpMessage
-
- io.netty5.handler.codec.http.DefaultHttpRequest
-
- All Implemented Interfaces:
DecoderResultProvider,HttpMessage,HttpObject,HttpRequest
- Direct Known Subclasses:
DefaultFullHttpRequest
public class DefaultHttpRequest extends DefaultHttpMessage implements HttpRequest
The defaultHttpRequestimplementation.
-
-
Constructor Summary
Constructors Constructor Description DefaultHttpRequest (HttpVersion httpVersion, HttpMethod method, String uri)Creates a new instance.DefaultHttpRequest (HttpVersion httpVersion, HttpMethod method, String uri, boolean validateHeaders)Creates a new instance.DefaultHttpRequest (HttpVersion httpVersion, HttpMethod method, String uri, HttpHeaders headers)Creates a new instance.
-
Method Summary
All Methods Modifier and Type Method Description booleanequals (Object o)inthashCode ()HttpMethodmethod ()Returns theHttpMethodof thisHttpRequest.HttpRequestsetMethod (HttpMethod method)Set theHttpMethodof thisHttpRequest.HttpRequestsetProtocolVersion (HttpVersion version)Set the protocol version of thisHttpMessageHttpRequestsetUri (String uri)Set the requested URI (or alternatively, path)StringtoString ()Stringuri ()Returns the requested URI (or alternatively, path)-
Methods inherited from class io.netty5.handler.codec.http.DefaultHttpMessage
getProtocolVersion, headers, protocolVersion
-
Methods inherited from class io.netty5.handler.codec.http.DefaultHttpObject
decoderResult, setDecoderResult
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface io.netty5.handler.codec.DecoderResultProvider
decoderResult, setDecoderResult
-
Methods inherited from interface io.netty5.handler.codec.http.HttpMessage
getProtocolVersion, headers, protocolVersion
-
-
-
-
Constructor Detail
-
DefaultHttpRequest
public DefaultHttpRequest(HttpVersion httpVersion, HttpMethod method, String uri)
Creates a new instance.- Parameters:
httpVersion- the HTTP version of the requestmethod- the HTTP method of the requesturi- the URI or path of the request
-
DefaultHttpRequest
public DefaultHttpRequest(HttpVersion httpVersion, HttpMethod method, String uri, boolean validateHeaders)
Creates a new instance.- Parameters:
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 theHttpHeaders
-
DefaultHttpRequest
public DefaultHttpRequest(HttpVersion httpVersion, HttpMethod method, String uri, HttpHeaders headers)
Creates a new instance.- Parameters:
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
-
-
Method Detail
-
method
public HttpMethod method()
Description copied from interface:HttpRequestReturns theHttpMethodof thisHttpRequest.- Specified by:
methodin interfaceHttpRequest- Returns:
- The
HttpMethodof thisHttpRequest
-
uri
public String uri()
Description copied from interface:HttpRequestReturns the requested URI (or alternatively, path)- Specified by:
uriin interfaceHttpRequest- Returns:
- The URI being requested
-
setMethod
public HttpRequest setMethod(HttpMethod method)
Description copied from interface:HttpRequestSet theHttpMethodof thisHttpRequest.- Specified by:
setMethodin interfaceHttpRequest
-
setUri
public HttpRequest setUri(String uri)
Description copied from interface:HttpRequestSet the requested URI (or alternatively, path)- Specified by:
setUriin interfaceHttpRequest
-
setProtocolVersion
public HttpRequest setProtocolVersion(HttpVersion version)
Description copied from interface:HttpMessageSet the protocol version of thisHttpMessage- Specified by:
setProtocolVersionin interfaceHttpMessage- Specified by:
setProtocolVersionin interfaceHttpRequest- Overrides:
setProtocolVersionin classDefaultHttpMessage
-
hashCode
public int hashCode()
- Overrides:
hashCodein classDefaultHttpMessage
-
equals
public boolean equals(Object o)
- Overrides:
equalsin classDefaultHttpMessage
-
-