[−][src]Struct easy_http_request::HttpRequest
The http request sender. See DefaultHttpRequest
or StaticHttpRequest
.
Fields
method: HttpRequestMethod
url: Url
max_response_body_size: usize
The size limit of the response body.
max_redirect_count: usize
max_connection_time: u64
The time limit in milliseconds of a connection. 0 means the time is unlimited.
query: Option<HashMap<QK, QV>>
body: Option<HttpRequestBody<BK, BV>>
headers: Option<HashMap<HK, HV>>
allow_localhost: bool
Methods
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]
method: HttpRequestMethod,
url: Url
) -> HttpRequest<QK, QV, BK, BV, HK, HV>
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]
url: S
) -> Result<HttpRequest<QK, QV, BK, BV, HK, HV>, HttpRequestError>
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]
url: S
) -> Result<HttpRequest<QK, QV, BK, BV, HK, HV>, HttpRequestError>
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]
url: S
) -> Result<HttpRequest<QK, QV, BK, BV, HK, HV>, HttpRequestError>
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]
url: S
) -> Result<HttpRequest<QK, QV, BK, BV, HK, HV>, HttpRequestError>
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]
url: S
) -> Result<HttpRequest<QK, QV, BK, BV, HK, HV>, HttpRequestError>
pub fn send(self) -> Result<HttpResponse, HttpRequestError>
[src]
Send a request and drop this sender.
impl<QK: Eq + Hash + AsRef<str>, QV: AsRef<str>, BK: Eq + Hash + AsRef<str> + Clone, BV: AsRef<str> + Clone, HK: Eq + Hash + AsRef<str>, HV: AsRef<str>> HttpRequest<QK, QV, BK, BV, HK, HV>
[src]
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: Eq + Hash + AsRef<str> + Clone, QV: AsRef<str> + Clone, BK: Eq + Hash + AsRef<str> + Clone, BV: AsRef<str> + Clone, HK: Eq + Hash + AsRef<str> + Clone, HV: AsRef<str> + Clone> Clone for HttpRequest<QK, QV, BK, BV, HK, HV>
[src]
fn clone(&self) -> HttpRequest<QK, QV, BK, BV, HK, HV>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
Auto Trait Implementations
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,
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,
BK: Sync,
BV: Sync,
HK: Sync,
HV: Sync,
QK: Sync,
QV: Sync,
Blanket Implementations
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> From for T
[src]
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,