#include <userver/http/content_type.hpp>
Content-Type representation.
Definition at line 26 of file content_type.hpp.
Public Member Functions | |
std::string | MediaType () const |
Media type (application/json). | |
const std::string & | TypeToken () const |
"type" token of media type (application). | |
const std::string & | SubtypeToken () const |
"subtype" token of media type (json). | |
bool | HasExplicitCharset () const |
Whether the "charset" option was explicitly specified. | |
const std::string & | Charset () const |
Charset (utf-8). | |
int | Quality () const |
Value of "q" parameter in range 0–1000. | |
bool | DoesAccept (const ContentType &) const |
std::string | ToString () const |
Builds a string representation of content-type/media-range. | |
ContentType (std::string_view) | |
ContentType (const std::string &) | |
ContentType (const char *) | |
http::ContentType::ContentType | ( | std::string_view | ) |
Constructor from a single content-type/media-range header value as per RFC7231.
bool http::ContentType::DoesAccept | ( | const ContentType & | ) | const |
Whether this media range accepts specified content type. Differs from equality comparison in wildcard support.