pub struct Session {
pub sess_impl: Option<SessionImpl>,
}Fields§
§sess_impl: Option<SessionImpl>Implementations§
Source§impl Session
impl Session
pub fn new() -> Self
pub async fn new_request( &mut self, method: HttpMethod, url: &str, ) -> Result<HttpRequest>
pub async fn do_request(&mut self, req: HttpRequest) -> Result<HttpResponse>
pub async fn get( &mut self, url: &str, args: Vec<Headers>, ) -> Result<HttpResponse>
pub async fn post( &mut self, url: &str, body: Vec<u8>, args: Vec<Headers>, ) -> Result<HttpResponse>
pub async fn post_json( &mut self, url: &str, body: Value, args: Vec<Headers>, ) -> Result<HttpResponse>
pub async fn post_json_str( &mut self, url: &str, body: String, args: Vec<Headers>, ) -> Result<HttpResponse>
pub async fn put( &mut self, url: &str, body: Vec<u8>, args: Vec<Headers>, ) -> Result<HttpResponse>
pub async fn put_json( &mut self, url: &str, body: Value, args: Vec<Headers>, ) -> Result<HttpResponse>
pub async fn put_json_str( &mut self, url: &str, body: String, args: Vec<Headers>, ) -> Result<HttpResponse>
pub async fn delete( &mut self, url: &str, args: Vec<Headers>, ) -> Result<HttpResponse>
pub async fn head( &mut self, url: &str, args: Vec<Headers>, ) -> Result<HttpResponse>
pub async fn options( &mut self, url: &str, args: Vec<Headers>, ) -> Result<HttpResponse>
pub async fn connect( &mut self, url: &str, args: Vec<Headers>, ) -> Result<HttpResponse>
pub async fn patch( &mut self, url: &str, args: Vec<Headers>, ) -> Result<HttpResponse>
pub async fn trace( &mut self, url: &str, args: Vec<Headers>, ) -> Result<HttpResponse>
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for Session
impl !RefUnwindSafe for Session
impl Send for Session
impl Sync for Session
impl Unpin for Session
impl UnsafeUnpin 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