kaycxx-http
HTTP client library
Loading...
Searching...
No Matches
sized_istream.hpp
1// SPDX-FileCopyrightText: 2026 Klaus Reimer <k@ailis.de>
2// SPDX-License-Identifier: MIT
3
4#pragma once
5
6#include <cstdint>
7#include <functional>
8#include <iosfwd>
9
10namespace kaycxx::http {
11
12class request_body;
13
16public:
23 sized_istream(std::istream& input, std::uint64_t size) noexcept;
24
25private:
27 std::reference_wrapper<std::istream> input_;
28
30 std::uint64_t size_;
31
32 friend class request_body;
33};
34
35} // namespace kaycxx::http
Non-owning HTTP request body descriptor.
Definition request_body.hpp:33
sized_istream(std::istream &input, std::uint64_t size) noexcept
Associates an input stream with the number of bytes to read from it.