public class Request
extends java.lang.Object
implements io.netty.handler.codec.http.FullHttpRequest
| Constructor and Description |
|---|
Request(Server server,
io.netty.channel.Channel channel,
io.netty.handler.codec.http.FullHttpRequest request,
io.netty.handler.codec.http.router.RouteResult routeResult) |
| Modifier and Type | Method and Description |
|---|---|
java.util.Map<java.lang.String,java.util.List<java.lang.String>> |
bodyParams() |
io.netty.channel.Channel |
channel() |
java.lang.String |
clientIp() |
io.netty.buffer.ByteBuf |
content() |
io.netty.handler.codec.http.FullHttpRequest |
copy() |
java.lang.String |
decodedPath() |
io.netty.handler.codec.DecoderResult |
decoderResult() |
io.netty.handler.codec.http.FullHttpRequest |
duplicate() |
io.netty.handler.codec.DecoderResult |
getDecoderResult() |
io.netty.handler.codec.http.HttpMethod |
getMethod() |
io.netty.handler.codec.http.HttpVersion |
getProtocolVersion() |
java.lang.String |
getUri() |
io.netty.handler.codec.http.HttpHeaders |
headers() |
io.netty.handler.codec.http.HttpMethod |
method() |
java.lang.String |
param(java.lang.String name)
Order: path, body, query
|
java.lang.String |
paramo(java.lang.String name)
Order: path, body, query
|
java.util.List<java.lang.String> |
params(java.lang.String name) |
java.util.Map<java.lang.String,java.lang.String> |
pathParams() |
io.netty.handler.codec.http.HttpVersion |
protocolVersion() |
java.util.Map<java.lang.String,java.util.List<java.lang.String>> |
queryParams() |
int |
refCnt() |
boolean |
release() |
boolean |
release(int arg0) |
java.lang.String |
remoteIp() |
io.netty.handler.codec.http.FullHttpRequest |
replace(io.netty.buffer.ByteBuf content) |
io.netty.handler.codec.http.FullHttpRequest |
retain() |
io.netty.handler.codec.http.FullHttpRequest |
retain(int arg0) |
io.netty.handler.codec.http.FullHttpRequest |
retainedDuplicate() |
Server |
server() |
void |
setDecoderResult(io.netty.handler.codec.DecoderResult arg0) |
io.netty.handler.codec.http.FullHttpRequest |
setMethod(io.netty.handler.codec.http.HttpMethod arg0) |
io.netty.handler.codec.http.FullHttpRequest |
setProtocolVersion(io.netty.handler.codec.http.HttpVersion arg0) |
io.netty.handler.codec.http.FullHttpRequest |
setUri(java.lang.String arg0) |
java.lang.String |
toString() |
io.netty.handler.codec.http.FullHttpRequest |
touch() |
io.netty.handler.codec.http.FullHttpRequest |
touch(java.lang.Object hint) |
io.netty.handler.codec.http.HttpHeaders |
trailingHeaders() |
java.lang.String |
uri() |
public Request(Server server, io.netty.channel.Channel channel, io.netty.handler.codec.http.FullHttpRequest request, io.netty.handler.codec.http.router.RouteResult routeResult)
public Server server()
public io.netty.channel.Channel channel()
public java.lang.String clientIp()
public java.lang.String remoteIp()
public java.lang.String decodedPath()
public java.util.Map<java.lang.String,java.lang.String> pathParams()
public java.util.Map<java.lang.String,java.util.List<java.lang.String>> queryParams()
public java.util.Map<java.lang.String,java.util.List<java.lang.String>> bodyParams()
public java.lang.String param(java.lang.String name)
throws MissingParam
When there's no param, this method will throw exception MissingParam.
If you don't handle this exception, response "400 Bad Request" will be automatically
responded by method respondMissingParam (you can override it if you want).
If you want "null" instead, please use method "paramo".
MissingParampublic java.lang.String paramo(java.lang.String name)
When there's no param, this method will return null. See also method param.
public java.util.List<java.lang.String> params(java.lang.String name)
public io.netty.handler.codec.http.HttpMethod getMethod()
getMethod in interface io.netty.handler.codec.http.HttpRequestpublic io.netty.handler.codec.http.HttpMethod method()
method in interface io.netty.handler.codec.http.HttpRequestpublic java.lang.String getUri()
getUri in interface io.netty.handler.codec.http.HttpRequestpublic java.lang.String uri()
uri in interface io.netty.handler.codec.http.HttpRequestpublic io.netty.handler.codec.http.HttpVersion getProtocolVersion()
getProtocolVersion in interface io.netty.handler.codec.http.HttpMessagepublic io.netty.handler.codec.http.HttpVersion protocolVersion()
protocolVersion in interface io.netty.handler.codec.http.HttpMessagepublic io.netty.handler.codec.http.HttpHeaders headers()
headers in interface io.netty.handler.codec.http.HttpMessagepublic io.netty.handler.codec.DecoderResult getDecoderResult()
getDecoderResult in interface io.netty.handler.codec.http.HttpObjectpublic io.netty.handler.codec.DecoderResult decoderResult()
decoderResult in interface io.netty.handler.codec.DecoderResultProviderpublic void setDecoderResult(io.netty.handler.codec.DecoderResult arg0)
setDecoderResult in interface io.netty.handler.codec.DecoderResultProviderpublic io.netty.handler.codec.http.HttpHeaders trailingHeaders()
trailingHeaders in interface io.netty.handler.codec.http.LastHttpContentpublic io.netty.handler.codec.http.FullHttpRequest retainedDuplicate()
retainedDuplicate in interface io.netty.buffer.ByteBufHolderretainedDuplicate in interface io.netty.handler.codec.http.FullHttpMessageretainedDuplicate in interface io.netty.handler.codec.http.FullHttpRequestretainedDuplicate in interface io.netty.handler.codec.http.HttpContentretainedDuplicate in interface io.netty.handler.codec.http.LastHttpContentpublic io.netty.handler.codec.http.FullHttpRequest replace(io.netty.buffer.ByteBuf content)
replace in interface io.netty.buffer.ByteBufHolderreplace in interface io.netty.handler.codec.http.FullHttpMessagereplace in interface io.netty.handler.codec.http.FullHttpRequestreplace in interface io.netty.handler.codec.http.HttpContentreplace in interface io.netty.handler.codec.http.LastHttpContentpublic io.netty.buffer.ByteBuf content()
content in interface io.netty.buffer.ByteBufHolderpublic int refCnt()
refCnt in interface io.netty.util.ReferenceCountedpublic boolean release()
release in interface io.netty.util.ReferenceCountedpublic boolean release(int arg0)
release in interface io.netty.util.ReferenceCountedpublic io.netty.handler.codec.http.FullHttpRequest copy()
copy in interface io.netty.buffer.ByteBufHoldercopy in interface io.netty.handler.codec.http.FullHttpMessagecopy in interface io.netty.handler.codec.http.FullHttpRequestcopy in interface io.netty.handler.codec.http.HttpContentcopy in interface io.netty.handler.codec.http.LastHttpContentpublic io.netty.handler.codec.http.FullHttpRequest duplicate()
duplicate in interface io.netty.buffer.ByteBufHolderduplicate in interface io.netty.handler.codec.http.FullHttpMessageduplicate in interface io.netty.handler.codec.http.FullHttpRequestduplicate in interface io.netty.handler.codec.http.HttpContentduplicate in interface io.netty.handler.codec.http.LastHttpContentpublic io.netty.handler.codec.http.FullHttpRequest retain()
retain in interface io.netty.buffer.ByteBufHolderretain in interface io.netty.handler.codec.http.FullHttpMessageretain in interface io.netty.handler.codec.http.FullHttpRequestretain in interface io.netty.handler.codec.http.HttpContentretain in interface io.netty.handler.codec.http.LastHttpContentretain in interface io.netty.util.ReferenceCountedpublic io.netty.handler.codec.http.FullHttpRequest touch()
touch in interface io.netty.buffer.ByteBufHoldertouch in interface io.netty.handler.codec.http.FullHttpMessagetouch in interface io.netty.handler.codec.http.FullHttpRequesttouch in interface io.netty.handler.codec.http.HttpContenttouch in interface io.netty.handler.codec.http.LastHttpContenttouch in interface io.netty.util.ReferenceCountedpublic io.netty.handler.codec.http.FullHttpRequest touch(java.lang.Object hint)
touch in interface io.netty.buffer.ByteBufHoldertouch in interface io.netty.handler.codec.http.FullHttpMessagetouch in interface io.netty.handler.codec.http.FullHttpRequesttouch in interface io.netty.handler.codec.http.HttpContenttouch in interface io.netty.handler.codec.http.LastHttpContenttouch in interface io.netty.util.ReferenceCountedpublic io.netty.handler.codec.http.FullHttpRequest retain(int arg0)
retain in interface io.netty.buffer.ByteBufHolderretain in interface io.netty.handler.codec.http.FullHttpMessageretain in interface io.netty.handler.codec.http.FullHttpRequestretain in interface io.netty.handler.codec.http.HttpContentretain in interface io.netty.handler.codec.http.LastHttpContentretain in interface io.netty.util.ReferenceCountedpublic io.netty.handler.codec.http.FullHttpRequest setMethod(io.netty.handler.codec.http.HttpMethod arg0)
setMethod in interface io.netty.handler.codec.http.FullHttpRequestsetMethod in interface io.netty.handler.codec.http.HttpRequestpublic io.netty.handler.codec.http.FullHttpRequest setProtocolVersion(io.netty.handler.codec.http.HttpVersion arg0)
setProtocolVersion in interface io.netty.handler.codec.http.FullHttpRequestsetProtocolVersion in interface io.netty.handler.codec.http.HttpMessagesetProtocolVersion in interface io.netty.handler.codec.http.HttpRequestpublic io.netty.handler.codec.http.FullHttpRequest setUri(java.lang.String arg0)
setUri in interface io.netty.handler.codec.http.FullHttpRequestsetUri in interface io.netty.handler.codec.http.HttpRequestpublic java.lang.String toString()
toString in class java.lang.Object