pub struct Request {Show 41 fields
pub config: Config,
pub protocol: Protocol,
pub method: Method,
pub uri: String,
pub app: String,
pub timestamp: f64,
pub datetime: String,
pub server_ip: String,
pub client_ip: String,
pub agent_ip: String,
pub origin: String,
pub host: String,
pub connection: Connection,
pub user_agent: String,
pub accept: String,
pub accept_encoding: String,
pub accept_language: String,
pub cache_control: String,
pub content_length: usize,
pub content_body_length: usize,
pub body: Vec<u8>,
pub referer: String,
pub content_type: RequestContentType,
pub boundary: String,
pub custom: JsonValue,
pub path: String,
pub query: String,
pub post: JsonValue,
pub text: String,
pub html: String,
pub get: JsonValue,
pub files: JsonValue,
pub authorization_mode: String,
pub authorization_user: String,
pub authorization_pass: String,
pub authorization_token: String,
pub authorization_data: String,
pub is_origin: bool,
pub upgrade: String,
pub sec_web_socket_key: String,
pub sec_web_socket_version: String,
/* private fields */
}Expand description
请求处理
Fields§
§config: Config§protocol: Protocol协议版本
method: Method当前请求类型
uri: String请求地址
app: String应用名称
timestamp: f64请求时间戳
datetime: String当前时间
server_ip: String服务器IP
client_ip: String客户端IP
agent_ip: String代理IP
origin: String请求源
host: String当前访问域名或者IP 主机和端口号 头域
connection: Connection连接方式
user_agent: String客户端类型
accept: String客户端接受类型
accept_encoding: String客户端接受加密
accept_language: String客户端接受语言
cache_control: String缓存机制
content_length: usize请求内容的长度
content_body_length: usize请求消息体长度
body: Vec<u8>消息体
referer: String来源于
content_type: RequestContentType请求类型
boundary: String分界线
custom: JsonValue自定义参数
path: String路径
query: String查询条件
post: JsonValue§text: String§html: String§get: JsonValue§files: JsonValue认证模式
is_origin: bool是否有源
upgrade: Stringwebsocket
sec_web_socket_key: Stringwebsocket 密钥
sec_web_socket_version: Stringwebsocket 版本
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Request
impl RefUnwindSafe for Request
impl Send for Request
impl Sync for Request
impl Unpin for Request
impl UnwindSafe for Request
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more