Synchronous HTTP client using the Windows WinHTTP API.
Response Get(const std::string &url, const ProgressCallback &progress=nullptr)
Perform a synchronous HTTP(S) GET request.
std::function< void(size_t bytesReceived, size_t totalBytes)> ProgressCallback
Optional progress callback: (bytesReceived, totalBytes). totalBytes may be 0 if unknown.
Simple HTTP response containing status, body, and error info.
bool success
True if the request completed without error.
std::string body
Response body.
std::string error
Error message (empty on success).
int statusCode
HTTP status code (e.g. 200, 404).