WoW Model Viewer
Your premiere tool for viewing, equipping and animating World of Warcraft models.
Loading...
Searching...
No Matches
HttpClient Namespace Reference

Synchronous HTTP client using the Windows WinHTTP API. More...

Classes

struct  Response
 Simple HTTP response containing status, body, and error info. More...
 

Typedefs

using ProgressCallback = std::function< void(size_t bytesReceived, size_t totalBytes)>
 Optional progress callback: (bytesReceived, totalBytes). totalBytes may be 0 if unknown.
 

Functions

Response Get (const std::string &url, const ProgressCallback &progress=nullptr)
 Perform a synchronous HTTP(S) GET request.
 

Detailed Description

Synchronous HTTP client using the Windows WinHTTP API.

Supports HTTPS via the OS certificate store (no OpenSSL required).

Typedef Documentation

◆ ProgressCallback

using HttpClient::ProgressCallback = typedef std::function<void(size_t bytesReceived, size_t totalBytes)>

Optional progress callback: (bytesReceived, totalBytes). totalBytes may be 0 if unknown.

Definition at line 40 of file HttpClient.h.

Function Documentation

◆ Get()

HttpClient::Response HttpClient::Get ( const std::string &  url,
const ProgressCallback progress = nullptr 
)

Perform a synchronous HTTP(S) GET request.

Parameters
urlThe full URL to fetch.
progressOptional callback invoked as data is received.
Returns
Response containing the status code, body, and any error.

Definition at line 73 of file HttpClient.cpp.

Here is the call graph for this function:
Here is the caller graph for this function: