pub struct Response { /* private fields */ }Implementations§
Source§impl Response
impl Response
pub async fn print(&self) -> Result<()>
pub async fn print_no_body(&self) -> Result<()>
pub fn header_all(&self, name: &str) -> Vec<String>
pub fn header(&self, name: &str) -> Option<String>
Sourcepub fn status(&self) -> StatusCode
pub fn status(&self) -> StatusCode
Return the Response status code
Return the cookie that has been set for this http response.
Return the cookie value that has been set for this http response.
Return the client httpc-test Cookie for a given name. Note: The response.client_cookies are the captured client cookies at the time of the response.
Return the client cookie value as String for a given name. Note: The response.client_cookies are the captured client cookies at the time of the response.
pub fn json_body(&self) -> Result<Value>
pub fn text_body(&self) -> Result<String>
pub fn json_value<T>(&self, pointer: &str) -> Result<T>where
T: DeserializeOwned,
pub fn json_body_as<T>(&self) -> Result<T>where
T: DeserializeOwned,
Auto Trait Implementations§
impl Freeze for Response
impl RefUnwindSafe for Response
impl Send for Response
impl Sync for Response
impl Unpin for Response
impl UnwindSafe for Response
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