HTTP client data types. More...

Data Structures

struct gos_http_request_t
HTTP request context. More...
struct gos_http_response_header_t
Holds non-basic HTTP response headers as linked-list. More...
struct gos_http_response_t
HTTP response struct used by gos_http_receive_response() More...
struct gos_http_response_config_t
Configuration of the HTTP response. More...

Enumerations

enum gos_http_status_code_t { ,
GOS_HTTP_STATUS_SWITCHING_PROTOCOLS = 101,
GOS_HTTP_STATUS_RESPONSE_OK = 200,
GOS_HTTP_STATUS_CREATED = 201,
GOS_HTTP_STATUS_ACCEPTED = 202,
GOS_HTTP_STATUS_NONAUTHORITATIVE = 203,
GOS_HTTP_STATUS_NO_CONTENT = 204,
GOS_HTTP_STATUS_RESET_CONTENT = 205,
GOS_HTTP_STATUS_PARTIAL_CONTENT = 206,
GOS_HTTP_STATUS_MULTIPLE_CHOICES = 300,
GOS_HTTP_STATUS_MOVED_PERMANENTLY = 301,
GOS_HTTP_STATUS_FOUND = 302,
GOS_HTTP_STATUS_SEE_OTHER = 303,
GOS_HTTP_STATUS_NOT_MODIFIED = 304,
GOS_HTTP_STATUS_USEPROXY = 305,
GOS_HTTP_STATUS_TEMPORARY_REDIRECT = 307,
GOS_HTTP_STATUS_BAD_REQUEST = 400,
GOS_HTTP_STATUS_UNAUTHORIZED = 401,
GOS_HTTP_STATUS_PAYMENT_REQUIRED = 402,
GOS_HTTP_STATUS_FORBIDDEN = 403,
GOS_HTTP_STATUS_NOT_FOUND = 404,
GOS_HTTP_STATUS_METHOD_NOT_ALLOWED = 405,
GOS_HTTP_STATUS_NOT_ACCEPTABLE = 406,
GOS_HTTP_STATUS_PROXY_AUTHENTICATION_REQUIRED = 407,
GOS_HTTP_STATUS_REQUEST_TIMEOUT = 408,
GOS_HTTP_STATUS_CONFLICT = 409,
GOS_HTTP_STATUS_GONE = 410,
GOS_HTTP_STATUS_LENGTH_REQUIRED = 411,
GOS_HTTP_STATUS_PRECONDITION_FAILED = 412,
GOS_HTTP_STATUS_REQUESTENTITYTOOLARGE = 413,
GOS_HTTP_STATUS_REQUESTURITOOLONG = 414,
GOS_HTTP_STATUS_UNSUPPORTEDMEDIATYPE = 415,
GOS_HTTP_STATUS_REQUESTED_RANGE_NOT_SATISFIABLE = 416,
GOS_HTTP_STATUS_EXPECTATION_FAILED = 417,
GOS_HTTP_STATUS_INTERNAL_SERVER_ERROR = 500,
GOS_HTTP_STATUS_NOT_IMPLEMENTED = 501,
GOS_HTTP_STATUS_BAD_GATEWAY = 502,
GOS_HTTP_STATUS_SERVICE_UNAVAILABLE = 503,
GOS_HTTP_STATUS_GATEWAY_TIMEOUT = 504,
GOS_HTTP_STATUS_VERSION_NOT_SUPPORTED = 505
}
HTTP status codes - Description source: https://en.wikipedia.org/wiki/List_of_GOS_HTTP_STATUS_status_codes . More...
enum gos_http_method_t {
GOS_HTTP_GET = 0,
GOS_HTTP_POST = 1,
GOS_HTTP_HEAD = 2,
GOS_HTTP_PUT = 3,
GOS_HTTP_DELETE = 4
}
HTTP request method. More...
enum gos_http_basic_header_t {
GOS_HTTP_CONTENT_TYPE ,
GOS_HTTP_CONTENT_LENGTH ,
GOS_HTTP_TRANSFER_ENCODING ,
GOS_HTTP_LOCATION
}
Basic response header used by the HTTP library. More...
enum gos_http_response_flags_t { GOS_HTTP_RESPONSE_ALL_HEADERS = (1 << 0) }
Flags for configuring a HTTP response. More...

Detailed Description

HTTP client data types.

Enumeration Type Documentation

gos_http_basic_header_t

Basic response header used by the HTTP library.

Enumerator
GOS_HTTP_CONTENT_TYPE

GOS_HTTP_CONTENT_TYPE.

GOS_HTTP_CONTENT_LENGTH

GOS_HTTP_CONTENT_LENGTH.

GOS_HTTP_TRANSFER_ENCODING

GOS_HTTP_TRANSFER_ENCODING.

GOS_HTTP_LOCATION

GOS_HTTP_LOCATION.

gos_http_method_t

HTTP request method.

Enumerator
GOS_HTTP_GET

GOS_HTTP_GET.

GOS_HTTP_POST

GOS_HTTP_POST.

GOS_HTTP_HEAD

GOS_HTTP_HEAD.

GOS_HTTP_PUT

GOS_HTTP_PUT.

GOS_HTTP_DELETE

GOS_HTTP_DELETE.

gos_http_response_flags_t

Flags for configuring a HTTP response.

Enumerator
GOS_HTTP_RESPONSE_ALL_HEADERS

Return all response headers (i.e. not just gos_http_basic_header_t )

gos_http_status_code_t

HTTP status codes - Description source: https://en.wikipedia.org/wiki/List_of_GOS_HTTP_STATUS_status_codes .

Enumerator
GOS_HTTP_STATUS_SWITCHING_PROTOCOLS

! The server has received the request headers and the client should proceed to send the request body.

GOS_HTTP_STATUS_RESPONSE_OK

! The requester has asked the server to switch protocols and the server has agreed to do so.

GOS_HTTP_STATUS_CREATED

! Standard response for successful HTTP requests.

GOS_HTTP_STATUS_ACCEPTED

! The request has been fulfilled, resulting in the creation of a new resource.

GOS_HTTP_STATUS_NONAUTHORITATIVE

! The request has been accepted for processing, but the processing has not been completed.

GOS_HTTP_STATUS_NO_CONTENT

! The server is a transforming proxy that received a 200 OK from its origin, but is returning a modified version of the origin's response.

GOS_HTTP_STATUS_RESET_CONTENT

! The server successfully processed the request and is not returning any content.

GOS_HTTP_STATUS_PARTIAL_CONTENT

! The server successfully processed the request, but is not returning any content.

GOS_HTTP_STATUS_MULTIPLE_CHOICES

! The server is delivering only part of the resource due to a range header sent by the client.

GOS_HTTP_STATUS_MOVED_PERMANENTLY

! Indicates multiple options for the resource from which the client may choose.

GOS_HTTP_STATUS_FOUND

! This and all future requests should be directed to the given URI.

GOS_HTTP_STATUS_SEE_OTHER

! Tells the client to look at (browse to) another url.

GOS_HTTP_STATUS_NOT_MODIFIED

! The response to the request can be found under another URI using the GET method.

GOS_HTTP_STATUS_USEPROXY

! Indicates that the resource has not been modified since the version specified by the request headers.

GOS_HTTP_STATUS_TEMPORARY_REDIRECT

! The requested resource is available only through a proxy.

GOS_HTTP_STATUS_BAD_REQUEST

! In this case, the request should be repeated with another URI; however, future requests should still use the original URI.

GOS_HTTP_STATUS_UNAUTHORIZED

! The server cannot or will not process the request due to an apparent client error.

GOS_HTTP_STATUS_PAYMENT_REQUIRED

! Authentication is required and has failed or has not yet been provided.

GOS_HTTP_STATUS_FORBIDDEN

! Reserved for future use.

GOS_HTTP_STATUS_NOT_FOUND

! The request was valid, but the server is refusing action.

GOS_HTTP_STATUS_METHOD_NOT_ALLOWED

! The requested resource could not be found but may be available in the future.

GOS_HTTP_STATUS_NOT_ACCEPTABLE

! A request method is not supported for the requested resource.

GOS_HTTP_STATUS_PROXY_AUTHENTICATION_REQUIRED

! The requested resource is capable of generating only content not acceptable according to the Accept headers sent in the request.

GOS_HTTP_STATUS_REQUEST_TIMEOUT

! he client must first authenticate itself with the proxy.

GOS_HTTP_STATUS_CONFLICT

! The server timed out waiting for the request.

GOS_HTTP_STATUS_GONE

! The request could not be processed because of conflict in the current state of the resource.

GOS_HTTP_STATUS_LENGTH_REQUIRED

! The resource requested is no longer available and will not be available again.

GOS_HTTP_STATUS_PRECONDITION_FAILED

! The request did not specify the length of its content.

GOS_HTTP_STATUS_REQUESTENTITYTOOLARGE

! The server does not meet one of the preconditions that the requester put on the request.

GOS_HTTP_STATUS_REQUESTURITOOLONG

! The request is larger than the server is willing or able to process.

GOS_HTTP_STATUS_UNSUPPORTEDMEDIATYPE

! The URI provided was too long for the server to process.

GOS_HTTP_STATUS_REQUESTED_RANGE_NOT_SATISFIABLE

! The request entity has a media type which the server or resource does not support.

GOS_HTTP_STATUS_EXPECTATION_FAILED

! The client has asked for a portion of the file, but the server cannot supply that portion.

GOS_HTTP_STATUS_INTERNAL_SERVER_ERROR

! The server cannot meet the requirements of the Expect request-header field.

GOS_HTTP_STATUS_NOT_IMPLEMENTED

! A generic error message, no more specific message is suitable.

GOS_HTTP_STATUS_BAD_GATEWAY

! The server either does not recognize the request method, or it lacks the ability to fulfil the request.

GOS_HTTP_STATUS_SERVICE_UNAVAILABLE

! The server was acting as a gateway or proxy and received an invalid response from the upstream server.

GOS_HTTP_STATUS_GATEWAY_TIMEOUT

! The server is currently unavailable (because it is overloaded or down for maintenance).

GOS_HTTP_STATUS_VERSION_NOT_SUPPORTED

! The server was acting as a gateway or proxy and did not receive a timely response from the upstream server.