Struct httpc_test::Response
source · 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>
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_body_as<T>(&self) -> Result<T>where T: DeserializeOwned,
Auto Trait Implementations§
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