6#include <kaycxx/http/buffered_response.hpp>
7#include <kaycxx/http/request_body.hpp>
8#include <kaycxx/http/request_options.hpp>
9#include <kaycxx/http/response_body.hpp>
10#include <kaycxx/http/streamed_response.hpp>
15namespace kaycxx::http {
89 std::string_view method,
110 std::string_view method,
111 std::string_view url,
133 std::string_view method,
134 std::string_view url,
189 std::string_view url,
244 std::string_view url,
299 std::string_view url,
354 std::string_view url,
370 [[nodiscard]] impl& require_impl();
373 std::unique_ptr<impl> impl_;
HTTP response with a buffered body.
Definition buffered_response.hpp:18
streamed_response put(std::string_view url, response_body output, const request_options &options={})
Sends a PUT request and streams the successful response body to an output stream.
buffered_response request(std::string_view method, std::string_view url, const request_options &options={})
Sends an HTTP request and buffers the response body.
buffered_response get(std::string_view url, const request_options &options={})
Sends a GET request and buffers the response body.
streamed_response get(std::string_view url, request_body body, response_body output, const request_options &options={})
Sends a GET request with a body and streams the successful response body to an output stream.
client & operator=(client &&other) noexcept
Move-assigns an HTTP client.
buffered_response put(std::string_view url, const request_options &options={})
Sends a PUT request and buffers the response body.
client()
Creates an HTTP client.
buffered_response get(std::string_view url, request_body body, const request_options &options={})
Sends a GET request with a body and buffers the response body.
buffered_response del(std::string_view url, request_body body, const request_options &options={})
Sends a DELETE request with a body and buffers the response body.
buffered_response del(std::string_view url, const request_options &options={})
Sends a DELETE request and buffers the response body.
client(request_options default_options)
Creates an HTTP client with default request options.
streamed_response del(std::string_view url, response_body output, const request_options &options={})
Sends a DELETE request and streams the successful response body to an output stream.
streamed_response del(std::string_view url, request_body body, response_body output, const request_options &options={})
Sends a DELETE request with a body and streams the successful response body to an output stream.
streamed_response request(std::string_view method, std::string_view url, request_body body, response_body output, const request_options &options={})
Sends an HTTP request with a body and streams the successful response body to an output stream.
streamed_response post(std::string_view url, request_body body, response_body output, const request_options &options={})
Sends a POST request with a body and streams the successful response body to an output stream.
client(client &&other) noexcept
Moves an HTTP client.
buffered_response request(std::string_view method, std::string_view url, request_body body, const request_options &options={})
Sends an HTTP request with a body and buffers the response body.
streamed_response post(std::string_view url, response_body output, const request_options &options={})
Sends a POST request and streams the successful response body to an output stream.
streamed_response request(std::string_view method, std::string_view url, response_body output, const request_options &options={})
Sends an HTTP request and streams the successful response body to an output stream.
~client()
Destroys the HTTP client.
streamed_response put(std::string_view url, request_body body, response_body output, const request_options &options={})
Sends a PUT request with a body and streams the successful response body to an output stream.
buffered_response put(std::string_view url, request_body body, const request_options &options={})
Sends a PUT request with a body and buffers the response body.
streamed_response get(std::string_view url, response_body output, const request_options &options={})
Sends a GET request and streams the successful response body to an output stream.
buffered_response post(std::string_view url, request_body body, const request_options &options={})
Sends a POST request with a body and buffers the response body.
buffered_response post(std::string_view url, const request_options &options={})
Sends a POST request and buffers the response body.
Non-owning HTTP request body descriptor.
Definition request_body.hpp:33
Non-owning HTTP response body destination.
Definition response_body.hpp:14
Successful HTTP response whose body has been written to an output stream.
Definition streamed_response.hpp:14
Optional HTTP request configuration.
Definition request_options.hpp:23