Struct tauri::http::Request
x3A;:Request,
pub struct Request {
pub head: RequestParts,
pub body: Vec<u8, Global>,
}
Expand description
Represents an HTTP request from the WebView.
An HTTP request consists of a head and a potentially optional body.
Platform-specific#
- Linux: Headers are not exposed.
#
Fieldshead: RequestParts``body: Vec<u8, Global>
#
ImplementationsRequest#
implnew(body: Vec<u8, Global>) -> Request#
pub fnCreates a new blank Request
with the body
method(&self) -> &Method#
pub fnReturns a reference to the associated HTTP method.
uri(&self) -> &str#
pub fnReturns a reference to the associated URI.
headers(&self) -> &HeaderMap<HeaderValue>#
pub fnReturns a reference to the associated header field map.
body(&self) -> &Vec<u8, Global>#
pub fnReturns a reference to the associated HTTP body.
into_parts(self) -> (RequestParts, Vec<u8, Global>)#
pub fnConsumes the request returning the head and body RequestParts.
#
Trait ImplementationsDebug for Request#
implfmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>#
pub fnFormats the value using the given formatter. Read more
Default for Request#
impldefault() -> Request#
pub fnReturns the “default value” for a type. Read more
#
Auto Trait ImplementationsRefUnwindSafe for Request#
implSend for Request#
implSync for Request#
implUnpin for Request#
implUnwindSafe for Request#
impl#
Blanket ImplementationsAny for T where T: 'static + ?Sized,[src]#
impl<T>type_id(&self) -> TypeId[src]#
pub fnGets the TypeId
of self
. Read more
Borrow<T> for T where T: ?Sized,[src]#
impl<T>borrow(&self) -> &T[src]#
pub fnImmutably borrows from an owned value. Read more
BorrowMut<T> for T where T: ?Sized,[src]#
impl<T>borrow_mut(&mut self) -> &mutT[src]#
pub fnMutably borrows from an owned value. Read more
From<T> for T[src]#
impl<T>from(t: T) -> T[src]#
pub fnPerforms the conversion.
Into<U> for T where U: From<T>,[src]#
impl<T, U>into(self) -> U[src]#
pub fnPerforms the conversion.
TryFrom<U> for T where U: Into<T>,[src]#
impl<T, U>Error = Infallible#
typeThe type returned in the event of a conversion error.
try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]#
pub fnPerforms the conversion.
TryInto<U> for T where U: TryFrom<T>,[src]#
impl<T, U>Error = <U as TryFrom<T>>::Error#
typeThe type returned in the event of a conversion error.
try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]#
pub fnPerforms the conversion.