glitchedhttps
|
Exit codes returned by the various glitchedhttps functions. More...
Go to the source code of this file.
Macros | |
#define | GLITCHEDHTTPS_SUCCESS 0 |
#define | GLITCHEDHTTPS_UNINITIALIZED 10 |
#define | GLITCHEDHTTPS_OUT_OF_MEM 100 |
#define | GLITCHEDHTTPS_NULL_ARG 200 |
#define | GLITCHEDHTTPS_INVALID_ARG 300 |
#define | GLITCHEDHTTPS_INVALID_PORT_NUMBER 400 |
#define | GLITCHEDHTTPS_INVALID_HTTP_METHOD_NAME 500 |
#define | GLITCHEDHTTPS_CHILLBUFF_ERROR 600 |
#define | GLITCHEDHTTPS_RESPONSE_PARSE_ERROR 700 |
#define | GLITCHEDHTTPS_EXTERNAL_ERROR 800 |
#define | GLITCHEDHTTPS_OVERFLOW 900 |
#define | GLITCHEDHTTPS_CONNECTION_TO_SERVER_FAILED 1000 |
#define | GLITCHEDHTTPS_HTTP_REQUEST_TRANSMISSION_FAILED 1100 |
#define | GLITCHEDHTTPS_HTTP_GETADDRINFO_FAILED 1200 |
#define | GLITCHEDHTTPS_EMPTY_RESPONSE 1300 |
Exit codes returned by the various glitchedhttps functions.
#define GLITCHEDHTTPS_CHILLBUFF_ERROR 600 |
When the error is not due to glitchedhttps but the underlying chillbuff instance (e.g. if the chillbuff init function fails for some reason (e.g. out of memory/failure to reallocate) and the http request function can't proceed without a stringbuilder).
#define GLITCHEDHTTPS_CONNECTION_TO_SERVER_FAILED 1000 |
Returned by a plain HTTP request if connection to the specified server couldn't be established.
#define GLITCHEDHTTPS_EMPTY_RESPONSE 1300 |
If the returned HTTP response string is empty.
#define GLITCHEDHTTPS_EXTERNAL_ERROR 800 |
When something fails that has nothing to do with glitchedhttps, like for example if something failed inside an MbedTLS function; in that case, check the logs (if you provided an error callback via the glitchedhttps_set_error_callback() function).
#define GLITCHEDHTTPS_HTTP_GETADDRINFO_FAILED 1200 |
Returned if the plain http:// request failed due to a getaddrinfo()
failure.
#define GLITCHEDHTTPS_HTTP_REQUEST_TRANSMISSION_FAILED 1100 |
Returned by a plain HTTP request if connection to the specified server was successful but the request couldn't be transmitted to the server.
#define GLITCHEDHTTPS_INVALID_ARG 300 |
This error code is returned by a glitchedhttps function if you passed an invalid parameter into it.
#define GLITCHEDHTTPS_INVALID_HTTP_METHOD_NAME 500 |
Returned if the given HTTP method is not one of the allowed ones (e.g. GET
, POST
, etc...).
#define GLITCHEDHTTPS_INVALID_PORT_NUMBER 400 |
Returned when the request URL has an invalid port number.
#define GLITCHEDHTTPS_NULL_ARG 200 |
Error code returned by a glitchedhttps function if you passed a NULL argument that shouldn't have been NULL.
#define GLITCHEDHTTPS_OUT_OF_MEM 100 |
If you get this, it means you're out of memory!
#define GLITCHEDHTTPS_OVERFLOW 900 |
Not good...
#define GLITCHEDHTTPS_RESPONSE_PARSE_ERROR 700 |
Returned if the HTTP response string couldn't be parsed.
#define GLITCHEDHTTPS_SUCCESS 0 |
Returned from a glitchedhttps function when everything went as expected.
#define GLITCHEDHTTPS_UNINITIALIZED 10 |
Returned when trying to submit a request without having initialized GlitchedHTTPS with the glitchedhttps_init() function first.
Never forget to glitchedhttps_free() once you're done using GlitchedHTTPS to release the resources and prevent memory leaks!