ゴミ箱
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
http::header::ContentType Class Reference

#include <typed_headers.hpp>

Inheritance diagram for http::header::ContentType:
http::header::TypedHeader

Public Member Functions

 ContentType (const std::string &type)
 
 ContentType (const char *type)
 
boost::beast::string_view name () const override
 
std::string value () const override
 

Static Public Member Functions

static ContentType json ()
 Creates ContentType for JSON. More...
 
static ContentType plain_text ()
 Creates ContentType for plain text. More...
 
static ContentType html ()
 Creates ContentType for HTML. More...
 
static ContentType form_url_enc ()
 Creates ContentType for web forms content. More...
 
static ContentType jpeg ()
 Creates ContentType for JPEG. More...
 
static ContentType png ()
 Creates ContentType for PNG. More...
 
static ContentType octet_stream ()
 Creates ContentType for octet stream. More...
 

Public Attributes

std::string type
 ContentType's text. More...
 

Detailed Description

Content-Type header, defined in RFC7231.

Constructor & Destructor Documentation

ContentType::ContentType ( const std::string &  type)
explicit

Creates ContentType instance from raw string.

Parameters
typeContentType's string.
ContentType::ContentType ( const char *  type)
explicit

Member Function Documentation

ContentType ContentType::form_url_enc ( )
static

Creates ContentType for web forms content.

ContentType ContentType::html ( )
static

Creates ContentType for HTML.

ContentType ContentType::jpeg ( )
static

Creates ContentType for JPEG.

ContentType ContentType::json ( )
static

Creates ContentType for JSON.

boost::beast::string_view ContentType::name ( ) const
overridevirtual
Returns
HTTP header name

Implements http::header::TypedHeader.

ContentType ContentType::octet_stream ( )
static

Creates ContentType for octet stream.

ContentType ContentType::plain_text ( )
static

Creates ContentType for plain text.

ContentType ContentType::png ( )
static

Creates ContentType for PNG.

std::string ContentType::value ( ) const
overridevirtual
Returns
HTTP header value

Implements http::header::TypedHeader.

Member Data Documentation

std::string http::header::ContentType::type

ContentType's text.


The documentation for this class was generated from the following files: