10Duke Scale C++ Client
Loading...
Searching...
No Matches
HTTPResponseToAPIException.h
1#ifndef TENDUKE_SE_HTTPRESPONSETOAPIEXCEPTION_H
2#define TENDUKE_SE_HTTPRESPONSETOAPIEXCEPTION_H
3
4#include "http/HTTPResponseToException.h"
5#include "json/JSONParser.h"
6
7#include <memory>
8
9namespace tenduke { namespace se { namespace http {
10
15{
16public:
21 explicit HTTPResponseToAPIException(const std::shared_ptr<const tenduke::json::JSONParser> &parseJson);
22
23protected:
28 void from4xx(tenduke::http::HTTPResponse &response) const override;
29
34 void from5xx(tenduke::http::HTTPResponse &response) const override;
35
36private:
37 const std::shared_ptr<const tenduke::json::JSONParser> parseJSON;
38};
39
40}}}
41
42#endif //TENDUKE_SE_HTTPRESPONSETOAPIEXCEPTION_H
HTTPResponseToAPIException(const std::shared_ptr< const tenduke::json::JSONParser > &parseJson)
Constructs new instance.
Definition HTTPResponseToAPIException.cpp:82
Utility service to throw an exception based on tenduke::http::HTTPResponse.
Definition HTTPResponseToException.h:18
A HTTP Response.
Definition HTTPResponse.h:15
void from5xx(tenduke::http::HTTPResponse &response) const override
Throws appropriate exceptions, when HTTP status code is 5xx.
Definition HTTPResponseToAPIException.cpp:64
void from4xx(tenduke::http::HTTPResponse &response) const override
Throws appropriate exceptions, when HTTP status code is 4xx.
Definition HTTPResponseToAPIException.cpp:21
HTTPResponseToAPIException(const std::shared_ptr< const tenduke::json::JSONParser > &parseJson)
Constructs new instance.
Definition HTTPResponseToAPIException.cpp:82
10Duke Scale C++ Client -specific HTTP implementation.
Definition APIException.h:9
Classes, functions and globals of 10Duke Scale C++ Client.
Definition AbstractClientFactory.h:16
Root for classes, functions and globals of 10Duke C++ Client.
Definition AbstractClientFactory.h:16