|
Orbit Framework 2.0.0
A high-performance asynchronous C++20 HTTP server framework.
|
What the application answered, as a test sees it. More...
#include <Client.hpp>
Public Member Functions | |
| std::optional< std::string > | header (std::string_view name) const |
| A header, by case-insensitive name. | |
| nlohmann::json | json () const |
| The body parsed as JSON (null if it is not JSON). | |
Public Attributes | |
| int | status = 0 |
| std::map< std::string, std::string > | headers |
| Header names as the application set them; look them up with header(). | |
| std::string | body |
| The whole body: the response body, or every chunk of a streamed one. | |
| std::vector< std::string > | chunks |
| A streamed response's chunks (write_chunk() and SSE events), in order. | |
| std::vector< http::Cookie > | cookies |
| bool | complete = false |
What the application answered, as a test sees it.
| std::optional< std::string > orbit::testing::Response::header | ( | std::string_view | name | ) | const |
A header, by case-insensitive name.
| nlohmann::json orbit::testing::Response::json | ( | ) | const |
The body parsed as JSON (null if it is not JSON).
| std::string orbit::testing::Response::body |
The whole body: the response body, or every chunk of a streamed one.
| std::vector<std::string> orbit::testing::Response::chunks |
A streamed response's chunks (write_chunk() and SSE events), in order.
| bool orbit::testing::Response::complete = false |
False if send()'s timeout passed first; a streamed response that has not called end() is incomplete, with what it sent so far.
| std::vector<http::Cookie> orbit::testing::Response::cookies |
Set-Cookie entries
| std::map<std::string, std::string> orbit::testing::Response::headers |
Header names as the application set them; look them up with header().
| int orbit::testing::Response::status = 0 |