HTTP response for streamed API.
More...
#include <userver/clients/http/streamed_response.hpp>
HTTP response for streamed API.
Call Request::async_perform_stream_body() to get one. You can use it for fast proxying backend response body to a remote Application.
Definition at line 24 of file streamed_response.hpp.
◆ Queue
◆ GetHeader()
std::string clients::http::StreamedResponse::GetHeader |
( |
const std::string & |
header_name | ) |
|
Returns HTTP header value by its name (case-insensitive) A missing key results in empty string
- Note
- may suspend the coroutine if headers are not obtained yet.
◆ GetHeaders()
const Headers & clients::http::StreamedResponse::GetHeaders |
( |
| ) |
|
Get all HTTP headers as a case-insensitive unordered map
- Note
- may suspend the coroutine if headers are not obtained yet.
◆ ReadChunk()
bool clients::http::StreamedResponse::ReadChunk |
( |
std::string & |
output, |
|
|
engine::Deadline |
|
|
) |
| |
Read another HTTP response body part into 'output'. Any previous data in 'output' is dropped.
- Note
- The chunk size is not guaranteed to be exactly multipart/form-data chunk size or any other HTTP-related size
-
may block if the chunk is not obtained yet.
◆ StatusCode()
Status clients::http::StreamedResponse::StatusCode |
( |
| ) |
|
HTTP status code.
- Note
- may suspend the coroutine if the code is not obtained yet.
The documentation for this class was generated from the following file: