pub struct Request { /* private fields */ }Implementations§
Source§impl Request
impl Request
pub fn new(url: &str, method: RequestMethod) -> Self
pub fn send(&self)
pub fn set_url<T: AsRef<str>>(self, url: T) -> Self
pub fn header<T: AsRef<str>>(self, key: T, value: T) -> Self
pub fn body<T: AsRef<[u8]>>(self, data: T) -> Self
pub fn set_method(self, method: RequestMethod) -> Self
pub fn status_code(&self) -> i32
pub fn get_method(&self) -> RequestMethod
pub fn get_header<T: AsRef<str>>(&self, key: T) -> Result<String>
pub fn url(&self) -> String
pub fn data(self) -> Vec<u8>
pub fn string(self) -> Result<String>
pub fn json(self) -> Result<JsonValue>
pub fn html(self) -> Result<Node>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Request
impl RefUnwindSafe for Request
impl Send for Request
impl Sync for Request
impl Unpin for Request
impl UnwindSafe for Request
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