public class HttpRequestImpl extends Object implements HttpRequest
| 构造器和说明 |
|---|
HttpRequestImpl(HttpRequestMeta httpRequestMeta) |
| 限定符和类型 | 方法和说明 |
|---|---|
String |
charset()
获取编码格式
|
long |
contentLength()
获取Content-Length
|
String |
contentType()
获取Content-Type
|
List<HttpCookie> |
cookieList()
获取Cookie列表
|
byte[] |
getBodyAsBytes()
获取输入流字节数组
|
String |
getHeader(String name)
获取http头部
|
InputStream |
getInputStream()
获取输入流
|
boolean |
hasHeader(String name)
http头部是否存在
|
String |
ip()
获取客户端ip
|
String |
method()
获取请求方法
|
String |
protocol()
协议版本
|
URI |
uri()
获取请求url
|
public HttpRequestImpl(HttpRequestMeta httpRequestMeta)
public String ip()
HttpRequestip 在接口中 HttpRequestpublic URI uri()
HttpRequesturi 在接口中 HttpRequestpublic String method()
HttpRequestmethod 在接口中 HttpRequestpublic String protocol()
HttpRequestprotocol 在接口中 HttpRequestpublic String charset()
HttpRequestcharset 在接口中 HttpRequestpublic long contentLength()
HttpRequestcontentLength 在接口中 HttpRequestpublic String contentType()
HttpRequestcontentType 在接口中 HttpRequestpublic boolean hasHeader(String name)
HttpRequesthasHeader 在接口中 HttpRequestpublic String getHeader(String name)
HttpRequestgetHeader 在接口中 HttpRequestpublic List<HttpCookie> cookieList()
HttpRequestcookieList 在接口中 HttpRequestpublic byte[] getBodyAsBytes()
HttpRequestgetBodyAsBytes 在接口中 HttpRequestpublic InputStream getInputStream()
HttpRequestgetInputStream 在接口中 HttpRequestCopyright © 2021. All rights reserved.