class

FHttpBackend

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

Properties

TypeNameDescription
static constexpr int32_tkMaxRedirectsDefault 8.

Public functions

ReturnsNameDescription
IHttpBackend*ActiveThe backend HttpClient routes through, or null for libcurl.
voidSetOverride
EHttpBackendKindConfigured
std::stringValidateEmpty when the request may be sent, else the refusal text curl's path also produces.
boolRedirectAllowedA redirect target is followed only over http(s), and over https alone when the transfer is https-only (a downgrade would let a network attacker swap the payload).
FHttpTransportErrorMapUrlErrorNSURLError codes (Foundation's NSURLErrorDomain) mapped to the wording and flags the curl path reports, so callers and retry policies see one vocabulary.
std::stringMultipartContentType
std::stringBuildMultipartmultipart/form-data framing with the file contents read from disk; empty on a file that cannot be read, with the path in error.

Function details

Active

C++
static IHttpBackend* Active()

The backend HttpClient routes through, or null for libcurl. A test override wins; otherwise the http.Backend console variable picks (iOS defaults to NSURLSession, every other platform to curl).

SetOverride

C++
static void SetOverride(IHttpBackend* backend)

Configured

C++
static EHttpBackendKind Configured()

Validate

C++
static std::string Validate(const FHttpBackendRequest& request)

Empty when the request may be sent, else the refusal text curl's path also produces.

RedirectAllowed

C++
static bool RedirectAllowed(bool httpsOnly, const std::string& targetUrl)

A redirect target is followed only over http(s), and over https alone when the transfer is https-only (a downgrade would let a network attacker swap the payload).

MapUrlError

C++
static FHttpTransportError MapUrlError(int32_t nsUrlErrorCode)

NSURLError codes (Foundation's NSURLErrorDomain) mapped to the wording and flags the curl path reports, so callers and retry policies see one vocabulary.

MultipartContentType

C++
static std::string MultipartContentType(const std::string& boundary)

BuildMultipart

C++
static std::string BuildMultipart(const std::string& boundary, const std::map<std::string, std::string>& fields, const std::vector<HttpMultipartFile>& files, std::string& error)

multipart/form-data framing with the file contents read from disk; empty on a file that cannot be read, with the path in error.

Generated from Http/HttpBackend.h via http.json · Dec 4, 2026Version 1.1.0