Struct playwright::api::response::Response[][src]

pub struct Response { /* fields omitted */ }

Implementations

impl Response[src]

pub fn url(&self) -> Result<String, Error>[src]

pub fn status(&self) -> Result<i32, Error>[src]

Contains the status code of the response (e.g., 200 for a success).

pub fn status_text(&self) -> Result<String, Error>[src]

Contains the status text of the response (e.g. usually an “OK” for a success).

pub fn ok(&self) -> Result<bool, Error>[src]

Contains a boolean stating whether the response was successful (status in the range 200-299) or not.

pub fn request(&self) -> Request[src]

pub async fn finished(&self) -> Result<Option<String>, Arc<Error>>[src]

Waits for this response to finish, returns failure error if request failed.

pub async fn body(&self) -> Result<Vec<u8>, Arc<Error>>[src]

pub async fn text(&self) -> Result<String, Arc<Error>>[src]

Returns the text representation of response body.

pub async fn headers(&self) -> Result<Vec<Header>, Arc<Error>>[src]

Returns the object with HTTP headers associated with the response. All header names are lower-case.

pub fn frame(&self) -> Frame[src]

Trait Implementations

impl Debug for Response[src]

impl PartialEq<Response> for Response[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.