DeterministicESPAsyncWebServer
v6.27.1
Zero-allocation, bounded-execution async HTTP server for ESP32
Loading...
Searching...
No Matches
mime.h
Go to the documentation of this file.
1
// Copyright (C) 2026 Douglas Quigg (dstroy0) <dquigg123@gmail.com>
2
// SPDX-License-Identifier: AGPL-3.0-or-later
3
4
/**
5
* @file mime.h
6
* @brief Shared HTTP Content-Type ("MIME") string constants (one source of truth).
7
*
8
* The same media types were typed as string literals in the core server, the
9
* route services, and the examples (text/plain alone appeared ~27 times). These
10
* are the single home for the vocabulary: reference the pointer, never re-type the
11
* string, so a value can never silently diverge across call sites.
12
*
13
* Header-only like hex.h / numparse.h - no .cpp to wire into every test
14
* env's src filter. Each is a `const char *const` to a string literal: the literal
15
* lives in the linker's mergeable string section, so there is one copy in flash no
16
* matter how many translation units reference it, and an unused one costs nothing.
17
*
18
* @author Douglas Quigg (dstroy0)
19
* @date 2026
20
*/
21
22
#ifndef DETERMINISTICESPASYNCWEBSERVER_DET_MIME_H
23
#define DETERMINISTICESPASYNCWEBSERVER_DET_MIME_H
24
25
static
const
char
*
const
DET_MIME_JSON =
"application/json"
;
26
static
const
char
*
const
DET_MIME_TEXT_PLAIN =
"text/plain"
;
27
static
const
char
*
const
DET_MIME_TEXT_HTML =
"text/html"
;
28
static
const
char
*
const
DET_MIME_OCTET_STREAM =
"application/octet-stream"
;
29
static
const
char
*
const
DET_MIME_JAVASCRIPT =
"application/javascript"
;
30
31
#endif
// DETERMINISTICESPASYNCWEBSERVER_DET_MIME_H
src
shared_primitives
mime.h
Generated by
1.9.8