Response to the [edjx::storage::get
] request.
More...
#include <storage.hpp>
Response to the [edjx::storage::get
] request.
◆ StorageResponse() [1/2]
edjx::storage::StorageResponse::StorageResponse |
( |
| ) |
|
|
inline |
Constructs a response with no headers and an empty body.
◆ StorageResponse() [2/2]
edjx::storage::StorageResponse::StorageResponse |
( |
const std::map< std::string, std::string > & |
headers, |
|
|
const edjx::stream::ReadStream & |
read_stream |
|
) |
| |
|
inline |
Constructs a response with headers and body set to the provided values.
- Parameters
-
headers | HTTP headers for the response |
read_stream | Read stream for the body of the response |
◆ get_headers()
const std::map< std::string, std::string > & edjx::storage::StorageResponse::get_headers |
( |
| ) |
const |
Returns the metadata associated with the storage object.
- Returns
- Response headers
◆ get_read_stream()
Returns a read stream for the storage object.
- Returns
- Read stream
◆ read_body()
Retrieves the bytes of the storage object.
- Parameters
-
- Returns
- Returns StorageError::Success on success, StorageError::Success::EndOfStream when end of stream is reached, or some other value on failure.
◆ headers
std::map<std::string, std::string> edjx::storage::StorageResponse::headers |
HTTP headers of the response.
◆ read_stream
Body of the response as a read stream.
The documentation for this struct was generated from the following file: