kaycxx-http
HTTP client library
Loading...
Searching...
No Matches
request_options.hpp
1// SPDX-FileCopyrightText: 2026 Klaus Reimer <k@ailis.de>
2// SPDX-License-Identifier: MIT
3
4#pragma once
5
6#include <kaycxx/http/header.hpp>
7#include <kaycxx/http/transfer_progress.hpp>
8
9#include <chrono>
10#include <cstddef>
11#include <functional>
12#include <optional>
13#include <vector>
14
15namespace kaycxx::http {
16
30 std::vector<header> headers{};
31
33 std::optional<bool> follow_redirects{};
34
36 std::optional<std::size_t> max_redirects{};
37
39 std::optional<std::chrono::milliseconds> connect_timeout{};
40
42 std::optional<std::chrono::milliseconds> request_timeout{};
43
45 std::function<void(const transfer_progress&)> progress{};
46
48 std::optional<std::size_t> max_buffered_response_size{};
49};
50
51} // namespace kaycxx::http
Optional HTTP request configuration.
Definition request_options.hpp:23
std::function< void(const transfer_progress &)> progress
Callback receiving transfer progress.
Definition request_options.hpp:45
std::optional< std::chrono::milliseconds > connect_timeout
Maximum duration of the connection phase.
Definition request_options.hpp:39
std::optional< std::size_t > max_redirects
Maximum number of redirects to follow.
Definition request_options.hpp:36
std::optional< std::size_t > max_buffered_response_size
Maximum size of an internally buffered response body.
Definition request_options.hpp:48
std::optional< bool > follow_redirects
Whether HTTP redirects are followed.
Definition request_options.hpp:33
std::vector< header > headers
Request headers.
Definition request_options.hpp:30
std::optional< std::chrono::milliseconds > request_timeout
Maximum duration of the complete request.
Definition request_options.hpp:42
Current HTTP transfer progress reported by libcurl.
Definition transfer_progress.hpp:11