HTTP constants to be used with HTTP client or HTTP server. More...

Collaboration diagram for HTTP constants:

Namespaces

 ContentType
 

Macros

#define MIME_TYPE_MAP(XX)
 Basic MIME types and file extensions. More...
 

Enumerations

enum  MimeType
 

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(UNKNOWN, "", "") \
XX(HTML, "html", "text/html") \
XX(TEXT, "txt", "text/plain") \
XX(JS, "js", "text/javascript") \
XX(CSS, "css", "text/css") \
XX(XML, "xml", "text/xml") \
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")

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

Enumeration Type Documentation

◆ MimeType

enum MimeType