Size: 650 bytes.


 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
// cs/net/http/client.hh
#ifndef CS_NET_HTTP_CLIENT_HH
#define CS_NET_HTTP_CLIENT_HH

#include <map>
#include <string>

#include "cs/net/http/response.hh"
#include "cs/result.hh"

namespace cs {
ResultOr<std::string> Fetch(
    const std::string& url,
    const std::string& method = "GET",
    const std::map<std::string, std::string>& headers = {},
    const std::string& body = "");

ResultOr<cs::net::http::Response> FetchResponse(
    const std::string& url,
    const std::string& method = "GET",
    const std::map<std::string, std::string>& headers = {},
    const std::string& body = "");
}  // namespace cs
#endif  // CS_NET_HTTP_CLIENT_HH
v0 (commit) © 2025 @p13i.io | Load balancer proxied to: cs-code-viewer-3:8080 in 4ms.