 |
AlexaClientSDK
1.26.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
|
Go to the documentation of this file.
16 #ifndef ALEXA_CLIENT_SDK_AVSCOMMON_UTILS_INCLUDE_AVSCOMMON_UTILS_HTTP_HTTPRESPONSECODE_H_
17 #define ALEXA_CLIENT_SDK_AVSCOMMON_UTILS_INCLUDE_AVSCOMMON_UTILS_HTTP_HTTPRESPONSECODE_H_
151 logger::LogEntry(
"HttpResponseCodes", __func__).d(
"code", code).m(
"Unknown HTTP response code."));
162 return static_cast<std::underlying_type<HTTPResponseCode>::type
>(responseCode);
172 switch (responseCode) {
174 return "HTTP_RESPONSE_CODE_UNDEFINED";
178 return "SUCCESS_CREATED";
180 return "SUCCESS_ACCEPTED";
182 return "SUCCESS_NO_CONTENT";
184 return "SUCCESS_PARTIAL_CONTENT";
186 return "SUCCESS_END_CODE";
188 return "REDIRECTION_MULTIPLE_CHOICES";
190 return "REDIRECTION_MOVED_PERMANENTLY";
192 return "REDIRECTION_FOUND";
194 return "REDIRECTION_SEE_ANOTHER";
196 return "REDIRECTION_TEMPORARY_REDIRECT";
198 return "REDIRECTION_PERMANENT_REDIRECT";
200 return "CLIENT_ERROR_BAD_REQUEST";
202 return "CLIENT_ERROR_FORBIDDEN";
204 return "CLIENT_ERROR_THROTTLING_EXCEPTION";
206 return "SERVER_ERROR_INTERNAL";
208 return "SERVER_ERROR_NOT_IMPLEMENTED";
210 return "SERVER_UNAVAILABLE";
213 .d(
"longValue",
static_cast<long>(responseCode))
214 .m(
"Unknown HTTP response code."));
235 #endif // ALEXA_CLIENT_SDK_AVSCOMMON_UTILS_INCLUDE_AVSCOMMON_UTILS_HTTP_HTTPRESPONSECODE_H_
@ HTTP_RESPONSE_CODE_UNDEFINED
No HTTP response received.
Definition: HttpResponseCodes.h:29
@ REDIRECTION_MOVED_PERMANENTLY
Content moved permanently.
Definition: HttpResponseCode.h:47
HTTPResponseCode
Definition: HttpResponseCode.h:29
@ REDIRECTION_MULTIPLE_CHOICES
Multiple redirection choices.
Definition: HttpResponseCode.h:45
@ SERVER_ERROR_INTERNAL
HTTP code for internal error by server which didn't fulfill the request.
Definition: HttpResponseCode.h:65
@ SUCCESS_NO_CONTENT
HTTP Success with no response payload.
Definition: HttpResponseCode.h:40
@ SUCCESS_NO_CONTENT
HTTP Success with no response payload.
Definition: HttpResponseCodes.h:35
std::string responseCodeToString(HTTPResponseCode responseCode)
Definition: HttpResponseCode.h:171
@ REDIRECTION_START_CODE
First code in redirection range.
Definition: HttpResponseCode.h:77
@ SUCCESS_CREATED
HTTP Success with new resource created.
Definition: HttpResponseCode.h:36
@ SERVER_ERROR_NOT_IMPLEMENTED
HTTP code for internal error by server for not supporting the facility requested.
Definition: HttpResponseCode.h:67
@ SUCCESS_OK
HTTP Success with response payload.
Definition: HttpResponseCode.h:34
@ SUCCESS_ACCEPTED
Definition: HttpResponseCode.h:38
LogEntry is used to compile the log entry text to log via Logger.
Definition: LogEntry.h:32
HTTPResponseCode intToHTTPResponseCode(int code)
Definition: HttpResponseCode.h:115
@ SUCCESS_OK
HTTP Success with response payload.
Definition: HttpResponseCodes.h:31
bool isStatusCodeSuccess(HTTPResponseCode code)
Definition: HttpResponseCode.h:88
@ SUCCESS_END_CODE
Last success code.
Definition: HttpResponseCode.h:74
@ CLIENT_ERROR_THROTTLING_EXCEPTION
HTTP code for too many requests to the service.
Definition: HttpResponseCode.h:62
@ CLIENT_ERROR_FORBIDDEN
HTTP code for forbidden request by user.
Definition: HttpResponseCode.h:60
bool isRedirect(HTTPResponseCode code)
Definition: HttpResponseCode.h:98
Whether or not curl logs should be emitted.
Definition: AVSConnectionManager.h:36
void acsdkError(const LogEntry &entry)
Definition: LoggerUtils.cpp:80
@ REDIRECTION_TEMPORARY_REDIRECT
Content can be found on another URI, but the redirect should not be cached - cannot change HTTP metho...
Definition: HttpResponseCode.h:53
@ CLIENT_ERROR_BAD_REQUEST
HTTP code for invalid request by user.
Definition: HttpResponseCode.h:58
std::ostream & operator<<(std::ostream &os, const HTTPResponseCode &code)
Definition: HttpResponseCode.h:225
int responseCodeToInt(HTTPResponseCode responseCode)
Definition: HttpResponseCode.h:161
@ REDIRECTION_END_CODE
Last code in redirection range.
Definition: HttpResponseCode.h:79
@ SUCCESS_PARTIAL_CONTENT
HTTP Success with partial content.
Definition: HttpResponseCode.h:42
@ HTTP_RESPONSE_CODE_UNDEFINED
No HTTP response received.
Definition: HttpResponseCode.h:31
@ REDIRECTION_PERMANENT_REDIRECT
Content can be found on another URI, and the redirect should be cached - cannot change HTTP method.
Definition: HttpResponseCode.h:55
@ SUCCESS_ACCEPTED
HTTP Success with payload accepted for processing.
Definition: HttpResponseCodes.h:33
@ SUCCESS_START_CODE
First success code.
Definition: HttpResponseCode.h:72
@ SERVER_UNAVAILABLE
HTTP code for service not available.
Definition: HttpResponseCode.h:69
@ REDIRECTION_SEE_ANOTHER
See another - Should issue a GET to the other URI and assume that data was received on this request.
Definition: HttpResponseCode.h:51
@ REDIRECTION_FOUND
Content found on another URI.
Definition: HttpResponseCode.h:49
AlexaClientSDK 1.26.0 - Copyright 2016-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved.
Licensed under the Apache License, Version 2.0