pub struct Session { /* private fields */ }Expand description
HTTP session used to share configuration and cookies among different requests and responses
The Session is constructed by a SessionBuilder which accepts an HttpConfig and
a shared CookieJar.
When constructed, a Session can generate request builders with shared config and cookie environment.
See modules documentation for session user manual.
Implementations§
Source§impl Session
impl Session
Sourcepub fn config(&self) -> &HttpConfig
pub fn config(&self) -> &HttpConfig
Gets session config
Sourcepub fn connect<S>(&self, url: S) -> RequestBuilder
pub fn connect<S>(&self, url: S) -> RequestBuilder
Creates a CONNECT request builder
Sourcepub fn delete<S>(&self, url: S) -> RequestBuilder
pub fn delete<S>(&self, url: S) -> RequestBuilder
Creates a DELETE request builder
Sourcepub fn get<S>(&self, url: S) -> RequestBuilder
pub fn get<S>(&self, url: S) -> RequestBuilder
Creates a GET request builder
Sourcepub fn head<S>(&self, url: S) -> RequestBuilder
pub fn head<S>(&self, url: S) -> RequestBuilder
Creates a HEAD request builder
Sourcepub fn options<S>(&self, url: S) -> RequestBuilder
pub fn options<S>(&self, url: S) -> RequestBuilder
Creates a OPTIONS request builder
Sourcepub fn patch<S>(&self, url: S) -> RequestBuilder
pub fn patch<S>(&self, url: S) -> RequestBuilder
Creates a PATCH request builder
Sourcepub fn post<S>(&self, url: S) -> RequestBuilder
pub fn post<S>(&self, url: S) -> RequestBuilder
Creates a POST request builder
Sourcepub fn put<S>(&self, url: S) -> RequestBuilder
pub fn put<S>(&self, url: S) -> RequestBuilder
Creates a PUT request builder
Sourcepub fn trace<S>(&self, url: S) -> RequestBuilder
pub fn trace<S>(&self, url: S) -> RequestBuilder
Creates a TRACE request builder
Auto Trait Implementations§
impl Freeze for Session
impl RefUnwindSafe for Session
impl !Send for Session
impl !Sync for Session
impl Unpin for Session
impl UnwindSafe for Session
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