ForestHub SDK 0.1.0
C++14 LLM SDK for PC and embedded platforms
Loading...
Searching...
No Matches
foresthub::core::HttpClient Class Referenceabstract

Abstract interface for HTTP operations. More...

#include <http_client.hpp>

Public Member Functions

virtual HttpResponse Get (const std::string &url, const Headers &headers)=0
 Perform a GET request.
virtual HttpResponse Post (const std::string &url, const Headers &headers, const std::string &body)=0
 Perform a POST request with a raw body.
virtual void Delay (unsigned long ms)=0
 Delay execution for retry logic.

Detailed Description

Abstract interface for HTTP operations.

Member Function Documentation

◆ Delay()

virtual void foresthub::core::HttpClient::Delay ( unsigned long ms)
pure virtual

Delay execution for retry logic.

Parameters
msDelay duration in milliseconds.

◆ Get()

virtual HttpResponse foresthub::core::HttpClient::Get ( const std::string & url,
const Headers & headers )
pure virtual

Perform a GET request.

Parameters
urlFull URL to request.
headersHTTP headers to send.
Returns
HTTP response; status_code is 503 with a descriptive body on network-level failure.

◆ Post()

virtual HttpResponse foresthub::core::HttpClient::Post ( const std::string & url,
const Headers & headers,
const std::string & body )
pure virtual

Perform a POST request with a raw body.

Parameters
urlFull URL to request.
headersHTTP headers to send.
bodyRaw request body (typically JSON string).
Returns
HTTP response; status_code is 503 with a descriptive body on network-level failure.

The documentation for this class was generated from the following file: