pub struct Request {Show 16 fields
pub method: String,
pub url: Option<Url>,
pub proto: String,
pub proto_major: i32,
pub proto_minor: i32,
pub header: Vec<Element>,
pub body: Bytes,
pub content_length: i64,
pub transfer_encoding: Vec<String>,
pub host: String,
pub form: Vec<Element>,
pub post_form: Vec<Element>,
pub trailer_keys: Vec<String>,
pub remote_addr: String,
pub request_uri: String,
pub tls: Option<ConnectionState>,
}Expand description
Request is an http.Request see: https://pkg.go.dev/net/http#Request
Fields§
§method: Stringmethod specifies the HTTP method (GET, POST, PUT, etc.)
url: Option<Url>url specifies either the URI being requested (for server requests) or the URL to access (for client requests)
proto: Stringproto is the protocol version for incoming server requests
proto_major: i32proto_major is the major version
proto_minor: i32proto_minor is the minor version
header: Vec<Element>header contains the request header fields either received by the server or to be sent by the client
body: Bytesbody is the request payload in bytes
content_length: i64content_length records the length of the associated content
transfer_encoding: Vec<String>transfer_encoding lists the transfer encodings from outermost to innermost
host: Stringhost specifies the host on which the URL is sought
form: Vec<Element>form contains the parsed form data, including both the URL field’s query parameters and the PATCH, POST, or PUT form data
post_form: Vec<Element>post_form contains the parsed form data from PATCH, POST or PUT body parameters
trailer_keys: Vec<String>trailer_keys specifies additional headers that are sent after the request
remote_addr: Stringremote_addr allows HTTP servers and other software to record the network address that sent the request
request_uri: Stringrequest_uri is the unmodified request-target
tls: Option<ConnectionState>tls connection state
Trait Implementations§
Source§impl Message for Request
impl Message for Request
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>
fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>
fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn decode<B>(buf: B) -> Result<Self, DecodeError>
fn decode<B>(buf: B) -> Result<Self, DecodeError>
Source§fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>
fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>
Source§fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>
fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>
self. Read moreSource§fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>
fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>
self.impl StructuralPartialEq for Request
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request