13 #ifndef mitkIRESTManager_h 14 #define mitkIRESTManager_h 18 #include <MitkRESTExports.h> 21 #include <cpprest/json.h> 22 #include <cpprest/uri.h> 23 #include <cpprest/http_client.h> 58 virtual pplx::task<web::json::value> SendRequest(
61 const std::map<utility::string_t, utility::string_t> headers = {}) = 0;
73 virtual pplx::task<web::json::value> SendJSONRequest(
76 const web::json::value *body =
nullptr,
77 const std::map<utility::string_t, utility::string_t> headers = {},
78 const utility::string_t &filePath = {}
90 virtual pplx::task<web::json::value> SendBinaryRequest(
const web::uri &uri,
92 const std::vector<unsigned char> *body = {},
93 const std::map<utility::string_t, utility::string_t> headers = {}) = 0;
101 virtual void ReceiveRequest(
const web::uri &uri,
IRESTObserver *observer) = 0;
113 const web::json::value &body,
114 const web::http::method &method,
123 virtual void HandleDeleteObserver(
IRESTObserver *observer,
const web::uri &uri = {}) = 0;
125 virtual const std::map<int, RESTServer *>& GetServerMap() = 0;
126 virtual const std::map<std::pair<int, utility::string_t>,
IRESTObserver *>& GetObservers() = 0;
#define MITK_DECLARE_SERVICE_INTERFACE(IFace, IId)
This is a microservice interface for managing REST requests.
DataCollection - Class to facilitate loading/accessing structured data.
Helper Class for realizing the handles of bounding object encapsulated by a geometry data...
RequestType
request type for client requests by calling SendRequest
web::http::http_response http_response
std::map< utility::string_t, utility::string_t > ParamMap