HTTP constants
HTTP constants to be used with HTTP client or HTTP server. More...
Collaboration diagram for HTTP constants:
Macros | |
#define | MIME_TYPE_MAP(XX) |
Basic MIME types and file extensions. More... | |
#define | XX(name, extensionStart, mime) name, |
#define | XX(name, extensionStart, mime) constexpr MimeType MIME_##name = MimeType::name; |
Enumerations | |
enum class | MimeType : uint8_t { XX , UNKNOWN } |
Functions | |
String | toString (MimeType m) |
Get textual representation for a MIME type. More... | |
Detailed Description
HTTP constants to be used with HTTP client or HTTP server.
Macro Definition Documentation
◆ MIME_TYPE_MAP
#define MIME_TYPE_MAP | ( | XX | ) |
Value:
/* Type, extension start, Mime type */ \
\
/* Texts */ \
XX(HTML, "html", "text/html") \
XX(TEXT, "txt", "text/plain") \
XX(CSS, "css", "text/css") \
XX(JSON, "json", "application/json") \
\
/* Images */ \
XX(JPEG, "jpg", "image/jpeg") \
XX(GIF, "gif", "image/gif") \
XX(PNG, "png", "image/png") \
XX(SVG, "svg", "image/svg+xml") \
XX(ICO, "ico", "image/x-icon") \
\
/* Archives */ \
XX(GZIP, "gzip", "application/x-gzip") \
XX(ZIP, "zip", "application/zip") \
\
/* Binary and Form */ \
XX(BINARY, "", "application/octet-stream") \
XX(FORM_URL_ENCODED, "", "application/x-www-form-urlencoded") \
XX(FORM_MULTIPART, "", "multipart/form-data")
Definition: jerryscript/src/include/Jerryscript/Function.h:18
Definition: RapidXML.h:35
Basic MIME types and file extensions.
- Note
- Each MIME type can have only one associated file extension. Where other extensions
- Todo:
- Consider using sz-strings for file extension to enable matching to alternative file extensions
◆ XX [1/2]
#define XX | ( | name, | |
extensionStart, | |||
mime | |||
) | name, |
◆ XX [2/2]
#define XX | ( | name, | |
extensionStart, | |||
mime | |||
) | constexpr MimeType MIME_##name = MimeType::name; |
Enumeration Type Documentation
◆ MimeType
|
strong |