5#include <userver/server/http/http_response.hpp>
6#include <userver/server/request/response_base.hpp>
10namespace server::handlers {
14namespace server::http {
16class ResponseBodyStream
final {
18 ResponseBodyStream(ResponseBodyStream&&) =
default;
22 void PushBodyChunk(std::string&& chunk, engine::Deadline deadline);
24 void SetHeader(
const std::string&,
const std::string&);
26 void SetHeader(std::string_view,
const std::string&);
28 void SetEndOfHeaders();
30 void SetStatusCode(
int status_code);
38 server::http::HttpResponse::Queue::Producer&& queue_producer,
39 server::http::HttpResponse& http_response);
41 bool headers_ended_{
false};
42 HttpResponse::Queue::Producer queue_producer_;
43 server::http::HttpResponse& http_response_;