Struct easy_http_request::HttpRequest[][src]

pub struct HttpRequest<QK = String, QV = String, BK = String, BV = String, HK = String, HV = String> where
    QK: Eq + Hash + AsRef<str>,
    QV: AsRef<str>,
    BK: Eq + Hash + AsRef<str>,
    BV: AsRef<str>,
    HK: Eq + Hash + AsRef<str>,
    HV: AsRef<str>, 
{ pub method: HttpRequestMethod, pub url: Url, pub query: Option<HashMap<QK, QV>>, pub body: Option<HttpRequestBody<BK, BV>>, pub headers: Option<HashMap<HK, HV>>, pub options: HttpRequestOptions, }

The http request sender. See DefaultHttpRequest or StaticHttpRequest.

Fields

method: HttpRequestMethodurl: Urlquery: Option<HashMap<QK, QV>>body: Option<HttpRequestBody<BK, BV>>headers: Option<HashMap<HK, HV>>options: HttpRequestOptions

Implementations

impl<QK: Eq + Hash + AsRef<str>, QV: AsRef<str>, BK: Eq + Hash + AsRef<str>, BV: AsRef<str>, HK: Eq + Hash + AsRef<str>, HV: AsRef<str>> HttpRequest<QK, QV, BK, BV, HK, HV>[src]

pub fn new(
    method: HttpRequestMethod,
    url: Url
) -> HttpRequest<QK, QV, BK, BV, HK, HV>
[src]

pub fn get(url: Url) -> HttpRequest<QK, QV, BK, BV, HK, HV>[src]

pub fn get_from_url_str<S: AsRef<str>>(
    url: S
) -> Result<HttpRequest<QK, QV, BK, BV, HK, HV>, HttpRequestError>
[src]

pub fn post(url: Url) -> HttpRequest<QK, QV, BK, BV, HK, HV>[src]

pub fn post_from_url_str<S: AsRef<str>>(
    url: S
) -> Result<HttpRequest<QK, QV, BK, BV, HK, HV>, HttpRequestError>
[src]

pub fn put(url: Url) -> HttpRequest<QK, QV, BK, BV, HK, HV>[src]

pub fn put_from_url_str<S: AsRef<str>>(
    url: S
) -> Result<HttpRequest<QK, QV, BK, BV, HK, HV>, HttpRequestError>
[src]

pub fn delete(url: Url) -> HttpRequest<QK, QV, BK, BV, HK, HV>[src]

pub fn delete_from_url_str<S: AsRef<str>>(
    url: S
) -> Result<HttpRequest<QK, QV, BK, BV, HK, HV>, HttpRequestError>
[src]

pub fn head(url: Url) -> HttpRequest<QK, QV, BK, BV, HK, HV>[src]

pub fn head_from_url_str<S: AsRef<str>>(
    url: S
) -> Result<HttpRequest<QK, QV, BK, BV, HK, HV>, HttpRequestError>
[src]

pub fn send(self) -> Result<HttpResponse, HttpRequestError>[src]

Send a request and drop this sender.

pub fn send_preserved(&self) -> Result<HttpResponse, HttpRequestError>[src]

Send a request and preserve this sender so that it can be used again.

Trait Implementations

impl<QK, QV, BK, BV, HK, HV> Clone for HttpRequest<QK, QV, BK, BV, HK, HV> where
    QK: Eq + Hash + AsRef<str>,
    QV: AsRef<str>,
    BK: Eq + Hash + AsRef<str>,
    BV: AsRef<str>,
    HK: Eq + Hash + AsRef<str>,
    HV: AsRef<str>,
    QK: Clone,
    QV: Clone,
    BK: Clone,
    BV: Clone,
    HK: Clone,
    HV: Clone
[src]

impl<QK, QV, BK, BV, HK, HV> Debug for HttpRequest<QK, QV, BK, BV, HK, HV> where
    QK: Eq + Hash + AsRef<str>,
    QV: AsRef<str>,
    BK: Eq + Hash + AsRef<str>,
    BV: AsRef<str>,
    HK: Eq + Hash + AsRef<str>,
    HV: AsRef<str>,
    QK: Debug,
    QV: Debug,
    BK: Debug,
    BV: Debug,
    HK: Debug,
    HV: Debug
[src]

Auto Trait Implementations

impl<QK, QV, BK, BV, HK, HV> RefUnwindSafe for HttpRequest<QK, QV, BK, BV, HK, HV> where
    BK: RefUnwindSafe,
    BV: RefUnwindSafe,
    HK: RefUnwindSafe,
    HV: RefUnwindSafe,
    QK: RefUnwindSafe,
    QV: RefUnwindSafe

impl<QK, QV, BK, BV, HK, HV> Send for HttpRequest<QK, QV, BK, BV, HK, HV> where
    BK: Send,
    BV: Send,
    HK: Send,
    HV: Send,
    QK: Send,
    QV: Send

impl<QK, QV, BK, BV, HK, HV> Sync for HttpRequest<QK, QV, BK, BV, HK, HV> where
    BK: Sync,
    BV: Sync,
    HK: Sync,
    HV: Sync,
    QK: Sync,
    QV: Sync

impl<QK, QV, BK, BV, HK, HV> Unpin for HttpRequest<QK, QV, BK, BV, HK, HV> where
    BK: Unpin,
    BV: Unpin,
    HK: Unpin,
    HV: Unpin,
    QK: Unpin,
    QV: Unpin

impl<QK, QV, BK, BV, HK, HV> UnwindSafe for HttpRequest<QK, QV, BK, BV, HK, HV> where
    BK: UnwindSafe,
    BV: UnwindSafe,
    HK: UnwindSafe,
    HV: UnwindSafe,
    QK: UnwindSafe,
    QV: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Typeable for T where
    T: Any

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,