Struct playwright::api::response::Response [−][src]
pub struct Response { /* fields omitted */ }Implementations
impl Response[src]
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]
Shortcut for Response::request’s Request::frame
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Response
impl RefUnwindSafe for Responseimpl UnwindSafe for Response
impl UnwindSafe for Response