Thoth
A functional, expressive, asynchronous C++26 webdev library
Theme:
Default
Round
Robot
Loading...
Searching...
No Matches
MimeType.hpp
Go to the documentation of this file.
1
#pragma once
2
#include <string>
3
#include <optional>
4
#include <
Thoth/Http/NHeaders/_base.hpp
>
5
6
namespace
Thoth::Http::NHeaders
{
7
struct
MimeType
{
8
std::string
type
{};
9
std::string
subtype
{};
10
std::vector<std::pair<std::string, std::string>>
options
{};
11
12
bool
operator==
(
const
MimeType
& other)
const
;
13
};
14
15
struct
MimeTypes
{
16
MimeTypes
() =
delete
;
17
18
inline
static
const
MimeType
textPlain
{
"text"
,
"plain"
};
19
inline
static
const
MimeType
textHtml
{
"text"
,
"html"
};
20
inline
static
const
MimeType
appJson
{
"application"
,
"json"
};
21
inline
static
const
MimeType
appXml
{
"application"
,
"xml"
};
22
inline
static
const
MimeType
appOctetStream
{
"application"
,
"octet-stream"
};
23
inline
static
const
MimeType
imagePng
{
"image"
,
"png"
};
24
inline
static
const
MimeType
imageJpeg
{
"image"
,
"jpeg"
};
25
inline
static
const
MimeType
multipartForm
{
"multipart"
,
"form-data"
};
26
};
27
}
28
29
#include <Thoth/Http/NHeaders/Headers/MimeType.tpp>
_base.hpp
Thoth::Http::NHeaders
Definition
_base.hpp:5
Thoth::Http::NHeaders::MimeType
Definition
MimeType.hpp:7
Thoth::Http::NHeaders::MimeType::options
std::vector< std::pair< std::string, std::string > > options
Definition
MimeType.hpp:10
Thoth::Http::NHeaders::MimeType::type
std::string type
Definition
MimeType.hpp:8
Thoth::Http::NHeaders::MimeType::subtype
std::string subtype
Definition
MimeType.hpp:9
Thoth::Http::NHeaders::MimeType::operator==
bool operator==(const MimeType &other) const
Thoth::Http::NHeaders::MimeTypes
Definition
MimeType.hpp:15
Thoth::Http::NHeaders::MimeTypes::appJson
static const MimeType appJson
Definition
MimeType.hpp:20
Thoth::Http::NHeaders::MimeTypes::multipartForm
static const MimeType multipartForm
Definition
MimeType.hpp:25
Thoth::Http::NHeaders::MimeTypes::appOctetStream
static const MimeType appOctetStream
Definition
MimeType.hpp:22
Thoth::Http::NHeaders::MimeTypes::textPlain
static const MimeType textPlain
Definition
MimeType.hpp:18
Thoth::Http::NHeaders::MimeTypes::appXml
static const MimeType appXml
Definition
MimeType.hpp:21
Thoth::Http::NHeaders::MimeTypes::textHtml
static const MimeType textHtml
Definition
MimeType.hpp:19
Thoth::Http::NHeaders::MimeTypes::imagePng
static const MimeType imagePng
Definition
MimeType.hpp:23
Thoth::Http::NHeaders::MimeTypes::imageJpeg
static const MimeType imageJpeg
Definition
MimeType.hpp:24
Thoth::Http::NHeaders::MimeTypes::MimeTypes
MimeTypes()=delete
include
Thoth
Http
NHeaders
Headers
MimeType.hpp
Generated by
1.9.8