C++ edjLibrary SDK
|
Response for HTTP fetch request, which may include body, headers, and status code. More...
#include <fetch.hpp>
Public Member Functions | |
edjx::http::HttpStatusCode | get_status_code () const |
Returns the HTTP status code of the fetch response. More... | |
const edjx::http::HttpHeaders & | get_headers () const |
Returns HTTP headers of the fetch response. More... | |
edjx::error::StreamError | read_body (std::vector< uint8_t > &result) |
Reads and returns the HTTP body of the fetch response. More... | |
edjx::stream::ReadStream & | get_read_stream () |
Returns the HTTP body of the fetch response as a read stream. More... | |
Public Attributes | |
edjx::http::HttpStatusCode | status |
HTTP status code of the response. More... | |
edjx::http::HttpHeaders | headers |
HTTP headers of the response. More... | |
edjx::stream::ReadStream | read_stream |
Body of the response as a stream. More... | |
Response for HTTP fetch request, which may include body, headers, and status code.
const edjx::http::HttpHeaders & edjx::fetch::FetchResponse::get_headers | ( | ) | const |
Returns HTTP headers of the fetch response.
edjx::stream::ReadStream & edjx::fetch::FetchResponse::get_read_stream | ( | ) |
Returns the HTTP body of the fetch response as a read stream.
edjx::http::HttpStatusCode edjx::fetch::FetchResponse::get_status_code | ( | ) | const |
Returns the HTTP status code of the fetch response.
edjx::error::StreamError edjx::fetch::FetchResponse::read_body | ( | std::vector< uint8_t > & | result | ) |
Reads and returns the HTTP body of the fetch response.
This method should not be called more than once.
result | Response body will be copied to this object. |
edjx::http::HttpHeaders edjx::fetch::FetchResponse::headers |
HTTP headers of the response.
edjx::stream::ReadStream edjx::fetch::FetchResponse::read_stream |
Body of the response as a stream.
edjx::http::HttpStatusCode edjx::fetch::FetchResponse::status |
HTTP status code of the response.