Skip to content

How to get request's status code after a do_get ? #8

@cyril-marpaud

Description

@cyril-marpaud

Is there a way to get a request's status code ? Sth that would look like this:

let client = httpc_test::new_client(format!("http://localhost:{}", axum_test::LISTENING_PORT))?;

let status_code = client.do_get("/favicon.svg").await?.status_code().await?;

I can find no status-related info on the Response documentation 🤷

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions