![]() |
RTBKit
0.9
Open-source framework to create real-time ad bidding systems.
|
#include <http_rest_proxy.h>
Classes | |
| struct | Content |
| struct | Response |
Public Member Functions | |
| HttpRestProxy (const std::string &serviceUri="") | |
| Response | post (const std::string &resource, const Content &content=Content(), const RestParams &queryParams=RestParams(), const RestParams &headers=RestParams(), int timeout=-1) const |
| Response | get (const std::string &resource, const RestParams &queryParams=RestParams(), const RestParams &headers=RestParams(), int timeout=-1) const |
| Response | perform (const std::string &verb, const std::string &resource, const Content &content=Content(), const RestParams &queryParams=RestParams(), const RestParams &headers=RestParams(), int timeout=-1) const |
Public Attributes | |
| std::string | serviceUri |
A class that can be used to perform queries against an HTTP service. Normally used to consume REST-like APIs, hence the name.
Definition at line 25 of file http_rest_proxy.h.
| Response Datacratic::HttpRestProxy::get | ( | const std::string & | resource, |
| const RestParams & | queryParams = RestParams(), |
||
| const RestParams & | headers = RestParams(), |
||
| int | timeout = -1 |
||
| ) | const [inline] |
Perform a synchronous GET request from end to end.
Definition at line 110 of file http_rest_proxy.h.
| HttpRestProxy::Response Datacratic::HttpRestProxy::perform | ( | const std::string & | verb, |
| const std::string & | resource, | ||
| const Content & | content = Content(), |
||
| const RestParams & | queryParams = RestParams(), |
||
| const RestParams & | headers = RestParams(), |
||
| int | timeout = -1 |
||
| ) | const |
Perform a synchronous request from end to end.
Definition at line 30 of file http_rest_proxy.cc.
| Response Datacratic::HttpRestProxy::post | ( | const std::string & | resource, |
| const Content & | content = Content(), |
||
| const RestParams & | queryParams = RestParams(), |
||
| const RestParams & | headers = RestParams(), |
||
| int | timeout = -1 |
||
| ) | const [inline] |
Perform a POST request from end to end.
Definition at line 99 of file http_rest_proxy.h.
| std::string Datacratic::HttpRestProxy::serviceUri |
URI that will be automatically prepended to resources passed in to the perform() methods
Definition at line 130 of file http_rest_proxy.h.
1.7.6.1