Typedefs |
typedef enum http_method_tag | http_method_e |
typedef enum http_version_tag | http_version_e |
typedef enum http_content_type_tag | http_content_type_e |
typedef enum http_connection_tag | http_connection_e |
typedef enum
http_transfer_encoding_tag | http_transfer_encoding_e |
Enumerations |
enum | http_method_tag {
HTTP_METHOD_UNKNOWN = 0,
HTTP_METHOD_GET,
HTTP_METHOD_POST,
HTTP_METHOD_HEAD,
HTTP_METHOD_OPTIONS,
HTTP_METHOD_TRACE,
HTTP_METHOD_PUT,
HTTP_METHOD_DELETE
} |
enum | http_version_tag {
HTTP_VERSION_UNKNOWN = 0,
HTTP_VERSION_09 = 9,
HTTP_VERSION_10 = 10,
HTTP_VERSION_11 = 11,
HTTP_VERSION_12 = 12
} |
enum | http_content_type_tag { HTTP_CONTENT_TYPE_HTML = 0,
HTTP_CONTENT_TYPE_PLAIN
} |
enum | http_connection_tag { HTTP_CONNECTION_KEEPALIVE = 0,
HTTP_CONNECTION_CLOSE
} |
enum | http_transfer_encoding_tag { HTTP_TRANSFER_CHUNKED = 0,
HTTP_TRANSFER_NORMAL
} |
Functions |
const char * | http_get_code_description (const int code) |
| Returns the description of a HTTP code.
|
http_version_e | http_lookup_version (const char *version) |
| Looks up a HTTP version from a HTTP version string.
|
const char * | http_return_version (const http_version_e version) |
| Returns a valid HTTP version string from the enumeration.
|
http_method_e | http_lookup_method (const char *method, const size_t n) |
| Looks up a method enumeration from a method string.
|
char * | http_create_response (const http_version_e version, const int code, const http_connection_e connection, const http_content_type_e type, const char *message) |
| Create a response string based on the given code and HTTP version.
|
void | http_free_response (char *response) |
| Free a response string returned from http_create_response().
|
const char * | http_get_content_type_string (const http_content_type_e type) |
| Returns the string value of a HTTP content type.
|