class

HttpClient

Minimal libcurl-backed client. Each call owns its own easy handle, so the static methods are safe to call from multiple threads concurrently.

Module
Http
Header
#include "Http/HttpClient.h"
Namespace
Mowo

Public functions

ReturnsNameDescription
voidGlobalInitProcess-wide curl init/teardown.
voidGlobalShutdown
HttpResponsePostPOST a raw string body.
HttpResponseRequestAny HTTP verb ("GET", "POST", "PUT", "PATCH", "DELETE", ...).
HttpResponsePostMultipartmultipart/form-data POST: form fields + file attachments.
HttpResponseFetch
HttpDownloadResultDownload

Function details

GlobalInit

C++
static void GlobalInit()

Process-wide curl init/teardown. Idempotent; the request methods call GlobalInit() lazily, so explicit use is optional.

GlobalShutdown

C++
static void GlobalShutdown()

Post

C++
static HttpResponse Post(const std::string& url, const std::string& body, const std::vector<std::string>& headers = {}, long timeoutSeconds = 15)

POST a raw string body.

Request

C++
static HttpResponse Request(const std::string& method, const std::string& url, const std::string& body = "", const std::vector<std::string>& headers = {}, long timeoutSeconds = 15)

Any HTTP verb ("GET", "POST", "PUT", "PATCH", "DELETE", ...). An empty body sends no payload; GET with a body is refused by construction (a body on GET is undefined per RFC 9110 and proxies drop it silently).

PostMultipart

C++
static HttpResponse PostMultipart(const std::string& url, const std::map<std::string, std::string>& fields, const std::vector<HttpMultipartFile>& files, const std::vector<std::string>& headers = {}, long timeoutSeconds = 30)

multipart/form-data POST: form fields + file attachments. Used by the Sentry minidump upload.

Fetch

C++
static HttpResponse Fetch(const std::string& url, const HttpTransferOptions& options)

Download

C++
static HttpDownloadResult Download(const std::string& url, const std::string& filePath, const HttpTransferOptions& options, bool resume = true)
Generated from Http/HttpClient.h via http.json · Oct 26, 2026Version 1.0.0