#include <userver/server/http/http_response_body_stream.hpp>
Streaming HTTP response body writer that is passed to server::handlers::HttpHandlerBase::HandleStreamRequest() overloads.
Definition at line 23 of file http_response_body_stream.hpp.
Public Member Functions | |
| ResponseBodyStream (ResponseBodyStream &&)=default | |
| void | PushBodyChunk (std::string &&chunk, engine::Deadline deadline) |
| void | SetBody (std::string &&body) |
| Set full response body instead of sending chunks; should not be called after PushBodyChunk(). | |
| void | SetHeader (const std::string &, const std::string &) |
| void | SetHeader (std::string_view, const std::string &) |
| void | SetEndOfHeaders () |
| void | SetStatusCode (int status_code) |
| Set the HTTP status code; should not be called after PushBodyChunk() as the result will be ignored. | |
| void | SetStatusCode (HttpStatus status) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
| void server::http::ResponseBodyStream::PushBodyChunk | ( | std::string && | chunk, |
| engine::Deadline | deadline ) |
Send a chunk of response data; should not be called after SetBody(). It may NOT generate exactly one HTTP chunk per call to PushBodyChunk().
|
friend |
Definition at line 48 of file http_response_body_stream.hpp.