kaycxx-http
HTTP client library
Loading...
Searching...
No Matches
response_error.hpp
1// SPDX-FileCopyrightText: 2026 Klaus Reimer <k@ailis.de>
2// SPDX-License-Identifier: MIT
3
4#pragma once
5
6#include <kaycxx/http/buffered_response.hpp>
7#include <kaycxx/http/error.hpp>
8
9#include <string>
10
11namespace kaycxx::http {
12
16class response_error : public error {
17public:
25
27 ~response_error() override;
28
36 [[nodiscard]] const buffered_response& response() const & noexcept;
37
43 [[nodiscard]] buffered_response response() && noexcept;
44
45private:
47 buffered_response response_;
48};
49
50} // namespace kaycxx::http
HTTP response with a buffered body.
Definition buffered_response.hpp:18
error(std::string message)
Creates an HTTP client error.
const buffered_response & response() const &noexcept
Returns the HTTP response which caused this error.
response_error(std::string message, buffered_response response)
Creates an HTTP response error.
~response_error() override
Destroys the HTTP response error.