10Duke Scale C++ Client
Loading...
Searching...
No Matches
HTTPResponseToException.h
1#ifndef TENDUKE_HTTP_HTTPRESPONSETOEXCEPTION_H
2#define TENDUKE_HTTP_HTTPRESPONSETOEXCEPTION_H
3
4#include "./HTTPResponse.h"
5
6namespace tenduke { namespace http {
7
8
18{
19public:
24 virtual void basedOn(tenduke::http::HTTPResponse &response) const;
25
26protected:
31 virtual void from4xx(tenduke::http::HTTPResponse &response) const;
32
37 virtual void from4xx(int httpStatusCode) const;
38
42 virtual void from400() const;
43
47 virtual void from401() const;
48
52 virtual void from403() const;
53
57 virtual void from404() const;
58
63 virtual void from4xxOther(int httpStatusCode) const;
64
69 virtual void from5xx(tenduke::http::HTTPResponse &response) const;
70
75 virtual void from5xx(int httpStatusCode) const;
76};
77
78}}
79
80
81#endif // TENDUKE_HTTP_HTTPRESPONSETOEXCEPTION_H
Utility service to throw an exception based on tenduke::http::HTTPResponse.
Definition HTTPResponseToException.h:18
virtual void from400() const
Throws exception, when HTTP-status code is 400.
Definition HTTPResponseToException.cpp:52
virtual void basedOn(tenduke::http::HTTPResponse &response) const
Throws exception based on given HTTP response.
Definition HTTPResponseToException.cpp:11
virtual void from401() const
Throws exception, when HTTP-status code is 401.
Definition HTTPResponseToException.cpp:61
virtual void from5xx(tenduke::http::HTTPResponse &response) const
Throws exception for 5xx responses.
Definition HTTPResponseToException.cpp:28
virtual void from4xxOther(int httpStatusCode) const
Throws exception, when HTTP-status code some other 4xx-series.
Definition HTTPResponseToException.cpp:88
virtual void from403() const
Throws exception, when HTTP-status code is 403.
Definition HTTPResponseToException.cpp:70
virtual void from4xx(tenduke::http::HTTPResponse &response) const
Throws exception for HTTP 4xx responses.
Definition HTTPResponseToException.cpp:22
virtual void from404() const
Throws exception, when HTTP-status code is 404.
Definition HTTPResponseToException.cpp:79
A HTTP Response.
Definition HTTPResponse.h:15
Root for classes, functions and globals of 10Duke C++ Client.
Definition BackendConfiguration.h:7