Struct crux_http::protocol::HttpRequest
source · pub struct HttpRequest {
pub method: String,
pub url: String,
pub headers: Vec<HttpHeader>,
pub body: Vec<u8>,
}
Fields§
§method: String
§url: String
§headers: Vec<HttpHeader>
§body: Vec<u8>
Implementations§
source§impl HttpRequest
impl HttpRequest
pub fn get(url: impl Into<String>) -> HttpRequestBuilder
pub fn put(url: impl Into<String>) -> HttpRequestBuilder
pub fn delete(url: impl Into<String>) -> HttpRequestBuilder
pub fn post(url: impl Into<String>) -> HttpRequestBuilder
pub fn patch(url: impl Into<String>) -> HttpRequestBuilder
pub fn head(url: impl Into<String>) -> HttpRequestBuilder
pub fn options(url: impl Into<String>) -> HttpRequestBuilder
Trait Implementations§
source§impl Clone for HttpRequest
impl Clone for HttpRequest
source§fn clone(&self) -> HttpRequest
fn clone(&self) -> HttpRequest
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for HttpRequest
impl Debug for HttpRequest
source§impl Default for HttpRequest
impl Default for HttpRequest
source§fn default() -> HttpRequest
fn default() -> HttpRequest
Returns the “default value” for a type. Read more
source§impl<'de> Deserialize<'de> for HttpRequest
impl<'de> Deserialize<'de> for HttpRequest
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Operation for HttpRequest
impl Operation for HttpRequest
source§type Output = HttpResult
type Output = HttpResult
Output
assigns the type this request results in.source§impl PartialEq for HttpRequest
impl PartialEq for HttpRequest
source§impl Serialize for HttpRequest
impl Serialize for HttpRequest
impl Eq for HttpRequest
impl StructuralPartialEq for HttpRequest
Auto Trait Implementations§
impl Freeze for HttpRequest
impl RefUnwindSafe for HttpRequest
impl Send for HttpRequest
impl Sync for HttpRequest
impl Unpin for HttpRequest
impl UnwindSafe for HttpRequest
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)