#include <mitkRESTClient.h>
|
| | RESTClient () |
| |
| | ~RESTClient () |
| |
| pplx::task< web::json::value > | Get (const web::uri &uri, const std::map< utility::string_t, utility::string_t > headers) |
| | Executes a HTTP GET request with the given uri and returns a task waiting for a json object. More...
|
| |
| pplx::task< web::json::value > | Get (const web::uri &uri, const utility::string_t &filePath, const std::map< utility::string_t, utility::string_t > headers) |
| | Executes a HTTP GET request with the given uri and and stores the byte stream in a file given by the filePath. More...
|
| |
| pplx::task< web::json::value > | Put (const web::uri &uri, const web::json::value *content) |
| | Executes a HTTP PUT request with given uri and the content given as json. More...
|
| |
| pplx::task< web::json::value > | Post (const web::uri &uri, const web::json::value *content, const std::map< utility::string_t, utility::string_t > headers) |
| | Executes a HTTP POST request with given uri and the content given as json. More...
|
| |
| pplx::task< web::json::value > | Post (const web::uri &uri, const std::vector< unsigned char > *content, const std::map< utility::string_t, utility::string_t > headers) |
| | Executes a HTTP POST request with given uri and the content given as json. More...
|
| |
Definition at line 21 of file mitkRESTClient.h.
◆ http_request
◆ RESTClient()
| mitk::RESTClient::RESTClient |
( |
| ) |
|
◆ ~RESTClient()
| mitk::RESTClient::~RESTClient |
( |
| ) |
|
◆ Get() [1/2]
| pplx::task<web::json::value> mitk::RESTClient::Get |
( |
const web::uri & |
uri, |
|
|
const std::map< utility::string_t, utility::string_t > |
headers |
|
) |
| |
Executes a HTTP GET request with the given uri and returns a task waiting for a json object.
- Exceptions
-
- Parameters
-
| uri | the URI resulting the target of the HTTP request |
| headers | the additional headers to be set to the HTTP request |
- Returns
- task to wait for with resulting json object
◆ Get() [2/2]
| pplx::task<web::json::value> mitk::RESTClient::Get |
( |
const web::uri & |
uri, |
|
|
const utility::string_t & |
filePath, |
|
|
const std::map< utility::string_t, utility::string_t > |
headers |
|
) |
| |
Executes a HTTP GET request with the given uri and and stores the byte stream in a file given by the filePath.
- Exceptions
-
- Parameters
-
| uri | the URI resulting the target of the HTTP request |
| filePath | |
| headers | the additional headers to be set to the HTTP request |
- Returns
- task to wait for returning an empty json object
◆ Post() [1/2]
| pplx::task<web::json::value> mitk::RESTClient::Post |
( |
const web::uri & |
uri, |
|
|
const std::vector< unsigned char > * |
content, |
|
|
const std::map< utility::string_t, utility::string_t > |
headers |
|
) |
| |
Executes a HTTP POST request with given uri and the content given as json.
- Exceptions
-
- Parameters
-
| uri | defines the URI resulting the target of the HTTP request |
| content | the content as json value which should be the body of the request and thus the content of the created resource |
| headers | the additional headers to be set to the HTTP request |
- Returns
- task to wait for with resulting json object
◆ Post() [2/2]
| pplx::task<web::json::value> mitk::RESTClient::Post |
( |
const web::uri & |
uri, |
|
|
const web::json::value * |
content, |
|
|
const std::map< utility::string_t, utility::string_t > |
headers |
|
) |
| |
Executes a HTTP POST request with given uri and the content given as json.
- Exceptions
-
- Parameters
-
| uri | defines the URI resulting the target of the HTTP request |
| content | the content as json value which should be the body of the request and thus the content of the created resource |
| headers | the additional headers to be set to the HTTP request |
- Returns
- task to wait for with resulting json object
◆ Put()
| pplx::task<web::json::value> mitk::RESTClient::Put |
( |
const web::uri & |
uri, |
|
|
const web::json::value * |
content |
|
) |
| |
Executes a HTTP PUT request with given uri and the content given as json.
- Exceptions
-
- Parameters
-
| uri | defines the URI resulting the target of the HTTP request |
| content | the content as json value which should be the body of the request and thus the content of the created resources |
- Returns
- task to wait for with resulting json object
The documentation for this class was generated from the following file: