#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.
Public Types | |
using | Queue = concurrent::StringStreamQueue |
Public Member Functions | |
StreamedResponse (StreamedResponse &&)=default | |
StreamedResponse (const StreamedResponse &)=delete | |
StreamedResponse & | operator= (StreamedResponse &&)=default |
StreamedResponse & | operator= (const StreamedResponse &)=delete |
Status | StatusCode () |
HTTP status code. | |
std::string | GetHeader (const std::string &header_name) |
const Headers & | GetHeaders () |
const Response::CookiesMap & | GetCookies () |
bool | ReadChunk (std::string &output, engine::Deadline) |
Definition at line 46 of file streamed_response.hpp.
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
const Headers & clients::http::StreamedResponse::GetHeaders | ( | ) |
Get all HTTP headers as a case-insensitive unordered map
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.
Status clients::http::StreamedResponse::StatusCode | ( | ) |
HTTP status code.