构造器和说明 |
---|
HttpRequest() |
HttpRequest(Request request) |
限定符和类型 | 方法和说明 |
---|---|
Map<String,Object> |
attributes()
Get current request attributes
|
io.netty.buffer.ByteBuf |
body()
Get current request body as ByteBuf
|
String |
bodyToString()
Get current request body as string
|
static HttpRequest |
build(io.netty.channel.ChannelHandlerContext ctx,
io.netty.handler.codec.http.FullHttpRequest fullHttpRequest) |
Request |
cookie(Cookie cookie)
Add a cookie to the request
|
Cookie |
cookieRaw(String name)
Get raw cookie by cookie name
|
Map<String,Cookie> |
cookies()
Get current request cookies
|
Map<String,FileItem> |
fileItems()
Get current request all fileItems
|
Map<String,String> |
headers()
Get current request headers.
|
String |
host()
Get client host.
|
HttpMethod |
httpMethod()
Get current request HttpMethod. e.g: HttpMethod.GET
|
Request |
initPathParams(Route route)
init request path parameters
|
boolean |
isIE()
Gets the current request is the head of the IE browser
|
boolean |
isSecure()
Get current request is https.
|
boolean |
keepAlive()
Get current request is KeepAlive, HTTP1.1 is true.
|
String |
method()
Get current request http method. e.g: GET
|
Map<String,List<String>> |
parameters()
Get current request query parameters
|
Map<String,String> |
pathParams()
Get current request Path params, like /users/:uid
|
String |
protocol()
Get request http protocol
|
String |
queryString()
Get queryString. e.g: http://xxx.com/hello?
|
String |
remoteAddress()
Get client remote address. e.g: 102.331.234.11:38227
|
Session |
session()
Get current request session, if null then create
|
String |
uri()
Get request uri
|
String |
url()
Get request url
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
address, attribute, attribute, contentType, contextPath, cookie, cookie, fileItem, header, header, isAjax, pathInt, pathLong, pathString, query, query, queryDouble, queryDouble, queryInt, queryInt, queryLong, queryLong, userAgent
public HttpRequest()
public HttpRequest(Request request)
public Request initPathParams(@NonNull Route route)
Request
initPathParams
在接口中 Request
route
- route objectpublic String remoteAddress()
Request
remoteAddress
在接口中 Request
public Map<String,String> pathParams()
Request
pathParams
在接口中 Request
public String queryString()
Request
queryString
在接口中 Request
public Map<String,List<String>> parameters()
Request
parameters
在接口中 Request
public HttpMethod httpMethod()
Request
httpMethod
在接口中 Request
public boolean isSecure()
Request
public boolean isIE()
Request
public Cookie cookieRaw(@NonNull String name)
Request
public boolean keepAlive()
Request
public Map<String,Object> attributes()
Request
attributes
在接口中 Request
public Map<String,FileItem> fileItems()
Request
public io.netty.buffer.ByteBuf body()
Request
public String bodyToString()
Request
bodyToString
在接口中 Request
public static HttpRequest build(io.netty.channel.ChannelHandlerContext ctx, io.netty.handler.codec.http.FullHttpRequest fullHttpRequest)
Copyright © 2018. All rights reserved.