MySQL 8.0.39
Source Code Documentation
RestClient Class Reference

#include <rest_client.h>

Public Member Functions

 RestClient (IOContext &io_ctx, const std::string &address, uint16_t port)
 
 RestClient (IOContext &io_ctx, const std::string &address, uint16_t port, const std::string &username, const std::string &password)
 
 RestClient (IOContext &io_ctx, const HttpUri &u, const std::string &username, const std::string &password)
 
 RestClient (std::unique_ptr< HttpClient > &&http_client)
 
HttpRequest request_sync (HttpMethod::type method, const std::string &uri, const std::string &request_body={}, const std::string &content_type="application/json")
 
 operator bool () const
 
std::string error_msg () const
 

Private Attributes

std::string username_
 
std::string password_
 
std::unique_ptr< HttpClienthttp_client_
 

Constructor & Destructor Documentation

◆ RestClient() [1/4]

RestClient::RestClient ( IOContext io_ctx,
const std::string &  address,
uint16_t  port 
)
inline

◆ RestClient() [2/4]

RestClient::RestClient ( IOContext io_ctx,
const std::string &  address,
uint16_t  port,
const std::string &  username,
const std::string &  password 
)
inline

◆ RestClient() [3/4]

RestClient::RestClient ( IOContext io_ctx,
const HttpUri u,
const std::string &  username,
const std::string &  password 
)
inline

◆ RestClient() [4/4]

RestClient::RestClient ( std::unique_ptr< HttpClient > &&  http_client)
inline

Member Function Documentation

◆ error_msg()

std::string RestClient::error_msg ( ) const
inline

◆ operator bool()

RestClient::operator bool ( ) const
inline

◆ request_sync()

HttpRequest RestClient::request_sync ( HttpMethod::type  method,
const std::string &  uri,
const std::string &  request_body = {},
const std::string &  content_type = "application/json" 
)

Member Data Documentation

◆ http_client_

std::unique_ptr<HttpClient> RestClient::http_client_
private

◆ password_

std::string RestClient::password_
private

◆ username_

std::string RestClient::username_
private

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