#include <RpRestClient.h>
|
std::unique_ptr< web::http::client::http_client > | _client |
|
Definition at line 24 of file RpRestClient.h.
◆ RpRestClient()
MBMS_RT::RpRestClient::RpRestClient |
( |
const libconfig::Config & |
cfg | ) |
|
Definition at line 27 of file RpRestClient.cpp.
29 std::string url =
"http://localhost:3010/modem-api/";
30 cfg.lookupValue(
"modem.restful_api.uri", url);
31 _client = std::make_unique<http_client>(url);
std::unique_ptr< web::http::client::http_client > _client
static Config cfg
Global configuration object.
◆ ~RpRestClient()
virtual MBMS_RT::RpRestClient::~RpRestClient |
( |
| ) |
|
|
inlinevirtual |
◆ getMchInfo()
auto MBMS_RT::RpRestClient::getMchInfo |
( |
| ) |
|
Definition at line 34 of file RpRestClient.cpp.
36 auto res = web::json::value::array();
38 _client->request(methods::GET,
"mch_info")
39 .then([&res](http_response response) {
40 if (response.status_code() == status_codes::OK) {
41 res = response.extract_json().get();
44 }
catch (web::http::http_exception ex) { }
◆ getStatus()
auto MBMS_RT::RpRestClient::getStatus |
( |
| ) |
|
Definition at line 48 of file RpRestClient.cpp.
50 auto res = web::json::value::array();
52 _client->request(methods::GET,
"status")
53 .then([&res](http_response response) {
54 if (response.status_code() == status_codes::OK) {
55 res = response.extract_json().get();
58 }
catch (web::http::http_exception ex) { }
◆ _client
std::unique_ptr<web::http::client::http_client> MBMS_RT::RpRestClient::_client |
|
private |
The documentation for this class was generated from the following files: