kaycxx-http
HTTP client library
Loading...
Searching...
No Matches
kaycxx::http::streamed_response Class Reference

Successful HTTP response whose body has been written to an output stream. More...

#include <kaycxx/http/streamed_response.hpp>

Inheritance diagram for kaycxx::http::streamed_response:
Collaboration diagram for kaycxx::http::streamed_response:

Public Member Functions

 streamed_response (int status_code, std::vector< kaycxx::http::header > headers={})
 Creates a successful streamed HTTP response.
Public Member Functions inherited from kaycxx::http::response_base
int status_code () const noexcept
 Returns the HTTP status code.
const std::vector< kaycxx::http::header > & headers () const &noexcept
 Returns all response headers in their received order.
std::vector< kaycxx::http::headerheaders () &&noexcept
 Moves all response headers out of an expiring response.
std::optional< std::string_view > header (std::string_view name) const &noexcept
 Returns the first value of a response header using an ASCII case-insensitive name comparison.
std::optional< std::string > header (std::string_view name) &&noexcept
 Moves the first value of a response header out of an expiring response using an ASCII case-insensitive name comparison.
std::vector< std::string > headers (std::string_view name) const
 Returns all values of a response header using an ASCII case-insensitive name comparison.

Additional Inherited Members

Protected Member Functions inherited from kaycxx::http::response_base
 response_base (int status_code, std::vector< kaycxx::http::header > headers)
 Creates common HTTP response data.
 response_base (const response_base &)=default
 Copies common HTTP response data.
 response_base (response_base &&) noexcept=default
 Moves common HTTP response data.
response_baseoperator= (const response_base &)=default
 Copies common HTTP response data.
response_baseoperator= (response_base &&) noexcept=default
 Moves common HTTP response data.
 ~response_base ()=default
 Destroys common HTTP response data.

Detailed Description

Successful HTTP response whose body has been written to an output stream.

Constructor & Destructor Documentation

◆ streamed_response()

kaycxx::http::streamed_response::streamed_response ( int status_code,
std::vector< kaycxx::http::header > headers = {} )
explicit

Creates a successful streamed HTTP response.

Parameters
status_codeHTTP status code in the range 200 to 299.
headersResponse headers.

The documentation for this class was generated from the following file: