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: String
method 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: String
proto is the protocol version for incoming server requests
proto_major: i32
proto_major is the major version
proto_minor: i32
proto_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: Bytes
body is the request payload in bytes
content_length: i64
content_length records the length of the associated content
transfer_encoding: Vec<String>
transfer_encoding lists the transfer encodings from outermost to innermost
host: String
host 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: String
remote_addr allows HTTP servers and other software to record the network address that sent the request
request_uri: String
request_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>where
B: BufMut,
Self: Sized,
fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>where
B: BufMut,
Self: Sized,
source§fn encode_to_vec(&self) -> Vec<u8, Global> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8, Global> ⓘwhere
Self: Sized,
source§fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>where
B: BufMut,
Self: Sized,
fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>where
B: BufMut,
Self: Sized,
source§fn encode_length_delimited_to_vec(&self) -> Vec<u8, Global> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8, Global> ⓘwhere
Self: Sized,
source§fn decode<B>(buf: B) -> Result<Self, DecodeError>where
B: Buf,
Self: Default,
fn decode<B>(buf: B) -> Result<Self, DecodeError>where
B: Buf,
Self: Default,
source§fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>where
B: Buf,
Self: Default,
fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>where
B: Buf,
Self: Default,
source§fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>where
B: Buf,
Self: Sized,
fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>where
B: Buf,
Self: Sized,
self
. Read moresource§fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>where
B: Buf,
Self: Sized,
fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>where
B: Buf,
Self: Sized,
self
.source§impl PartialEq<Request> for Request
impl PartialEq<Request> for Request
impl StructuralPartialEq for Request
Auto Trait Implementations§
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> 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