ProtoCore v1.0.16
Deterministic, zero-heap network stack for embedded targets
Loading...
Searching...
No Matches
mime.h
Go to the documentation of this file.
1// ProtoCore v1.0.16 - 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 single home for the media-type vocabulary the core server, the route services and the
9 * examples all name: reference the pointer, never re-type the string, so a value cannot silently
10 * diverge across call sites.
11 *
12 * Header-only like hex.h - no .cpp to wire into every test
13 * env's src filter. Each is a `const char *const` to a string literal: the literal
14 * lives in the linker's mergeable string section, so there is one copy in flash no
15 * matter how many translation units reference it, and an unused one costs nothing.
16 *
17 * @author Douglas Quigg (dstroy0)
18 * @date 2026
19 */
20
21#ifndef PROTOCORE_MIME_H
22#define PROTOCORE_MIME_H
23
24static const char *const PROTOCORE_MIME_JSON = "application/json";
25static const char *const PROTOCORE_MIME_TEXT_PLAIN = "text/plain";
26static const char *const PROTOCORE_MIME_TEXT_HTML = "text/html";
27static const char *const PROTOCORE_MIME_OCTET_STREAM = "application/octet-stream";
28static const char *const PROTOCORE_MIME_JAVASCRIPT = "application/javascript";
29
30#endif // PROTOCORE_MIME_H