public class Request extends Object
Modifier and Type | Class and Description |
---|---|
static class |
Request.RequestType
HTTP 请求的枚举对象
|
Modifier and Type | Field and Description |
---|---|
protected boolean |
isSend |
Constructor and Description |
---|
Request()
构造函数
|
Request(Request request)
构造函数
|
Modifier and Type | Method and Description |
---|---|
Body |
body()
获取 Body 对象
|
void |
clear()
清理
|
List<Cookie> |
cookies()
获取所有的Cookies对象,返回一个 List
|
Request |
copyFrom(Request request) |
Request.RequestType |
getBodyType()
获取请求类型
|
Cookie |
getCookie(String name)
根据 Cookie 名称取 Cookie
|
Long |
getMark() |
String |
getQueryString(String charset)
获取QueryStirng 或 将参数拼装成QueryString
|
Header |
header()
获取 Header 对象
|
void |
init(Request request) |
boolean |
isHasBody() |
List<Part> |
parts()
获取所有的 Part 对象,返回一个 List
|
RequestProtocol |
protocol()
获取协议对象
|
void |
release() |
void |
send(IoSession session)
发送数据
|
void |
setHasBody(boolean hasBody) |
void |
setMark(Long mark) |
String |
toString() |
public Request(Request request)
request
- 请求对象public Request()
public void init(Request request)
public RequestProtocol protocol()
public Long getMark()
public void setMark(Long mark)
public Header header()
public Body body()
public boolean isHasBody()
public void setHasBody(boolean hasBody)
public Request.RequestType getBodyType()
public String getQueryString(String charset)
charset
- 字符集public Cookie getCookie(String name)
name
- Cookie 名称public void send(IoSession session) throws IOException
session
- socket 会话对象IOException
- IO异常public void release()
public void clear()
Copyright © 2020 Voovan. All rights reserved.