19#ifndef CPPREALM_NETWORKING_HTTP_HPP
20#define CPPREALM_NETWORKING_HTTP_HPP
22#include <cpprealm/internal/bridge/realm.hpp>
24#ifndef REALMCXX_VERSION_MAJOR
25#include <cpprealm/version_numbers.hpp>
37 枚举 class http_method { get, 帖子, patch, put, del };
41 using http_headers = std::map<std::string, std::string>;
50 http_method
method = http_method::get;
108 虚拟 void send_request_to_server(
const 请求 &
请求 ,
109 std::function<
void (
const response &)>&& Completion) = 0 ;
113 std::shared_ptr<http_transport_client> make_http_client();
115 [[maybe_unused]]
void set_http_client_factory(std::function<std::shared_ptr<http_transport_client>()>&&);
127std::Optional<::realm::internal::bridge::realm::sync_config::proxy_config>
proxy_config ;
129 using SSLVerifyCallback = bool(
const std::string& server_address,
130 internal::bridge:: 域::sync_config::proxy_config::port_type server_port,
131 const char* pem_data,
size_t pem_size,
int preverify_ok,
int depth);
153 void send_request_to_server(const:: 域::networking::request&
请求 ,
154 std::function<
void (const:: 域::networking::response&)>&&completion);
std::Optional<::realm::internal::bridge::realm::sync_config::proxy_config > proxy_config
Definition: http.hpp:127
std::option< std::string > ssl_trust_certificate_path
Definition: http.hpp:139
std::function< SSLVerifyCallback > ssl_verify_callback
Definition: http.hpp:145
bool client_validate_ssl
Definition: http.hpp:135
std::optional< std::map< std::string, std::string > > custom_http_headers
Definition: http.hpp:123
内置HTTP传输客户端。
Definition: http.hpp:118
http_headers headers
Definition: http.hpp:66
std::string 体
Definition: http.hpp:71
uint 64 _t timeout_ms
Definition: http.hpp:61
http_method 方法
Definition: http.hpp:50
std::string URL
Definition: http.hpp:55
std::string 体
Definition: http.hpp:96
http_headers headers
Definition: http.hpp:91
std::Optional< std::int 32 _t > client_error_code
Definition: http.hpp:101
int custom_status_code
Definition: http.hpp:86
int http_status_code
Definition: http.hpp:81