LongPort OpenAPI C++ SDK
Public Member Functions | List of all members
longport::HttpClient Class Reference

#include <http_client.hpp>

Public Member Functions

 HttpClient ()
 
 HttpClient (HttpClient &)=delete
 
 ~HttpClient ()
 
 HttpClient (const std::string &http_url, const std::string &app_key, const std::string &app_secret, const std::string &access_token)
 
Status from_env ()
 
void request (const std::string &method, const std::string &path, const std::optional< std::map< std::string, std::string >> &headers, const std::optional< std::string > &body, AsyncCallback< void *, HttpResult > callback)
 

Constructor & Destructor Documentation

◆ HttpClient() [1/3]

longport::HttpClient::HttpClient ( )

◆ HttpClient() [2/3]

longport::HttpClient::HttpClient ( HttpClient )
delete

◆ ~HttpClient()

longport::HttpClient::~HttpClient ( )

◆ HttpClient() [3/3]

longport::HttpClient::HttpClient ( const std::string &  http_url,
const std::string &  app_key,
const std::string &  app_secret,
const std::string &  access_token 
)

HttpClient

Parameters
http_urlHTTP endpoint url
app_keyApp key
app_secretApp secret
access_tokenAccess token

Member Function Documentation

◆ from_env()

Status longport::HttpClient::from_env ( )

◆ request()

void longport::HttpClient::request ( const std::string &  method,
const std::string &  path,
const std::optional< std::map< std::string, std::string >> &  headers,
const std::optional< std::string > &  body,
AsyncCallback< void *, HttpResult callback 
)

Performs a HTTP request


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