kaycxx-http
HTTP client library
Loading...
Searching...
No Matches
multipart_part.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/request_body.hpp>
8
9#include <optional>
10#include <string>
11#include <vector>
12
13namespace kaycxx::http {
14
18 std::string name;
19
22
24 std::optional<std::string> filename{};
25
27 std::optional<std::string> content_type{};
28
30 std::vector<header> headers{};
31};
32
33} // namespace kaycxx::http
Non-owning HTTP request body descriptor.
Definition request_body.hpp:33
Part of a multipart/form-data request body.
Definition multipart_part.hpp:16
std::optional< std::string > filename
Optional filename reported to the server.
Definition multipart_part.hpp:24
request_body body
Non-owning descriptor of the part body.
Definition multipart_part.hpp:21
std::vector< header > headers
Additional part headers.
Definition multipart_part.hpp:30
std::optional< std::string > content_type
Optional content type overriding the default selected for the part body.
Definition multipart_part.hpp:27
std::string name
Form field name.
Definition multipart_part.hpp:18