Cuberite
A lightweight, fast and extensible game server for Minecraft
|
Stores outgoing response headers and serializes them to an HTTP data stream. More...
#include <HTTPMessage.h>
Public Member Functions | |
void | AppendToData (AString &a_DataStream) const |
Appends the response to the specified datastream - response line and headers. More... | |
cHTTPOutgoingResponse (void) | |
Public Member Functions inherited from cHTTPMessage | |
virtual void | AddHeader (const AString &a_Key, const AString &a_Value) |
Adds a header into the internal map of headers. More... | |
cHTTPMessage (eKind a_Kind) | |
size_t | GetContentLength (void) const |
const AString & | GetContentType (void) const |
void | SetContentLength (size_t a_ContentLength) |
void | SetContentType (const AString &a_ContentType) |
virtual | ~cHTTPMessage () |
Private Types | |
using | Super = cHTTPMessage |
Additional Inherited Members | |
Public Types inherited from cHTTPMessage | |
enum | eKind { mkRequest , mkResponse } |
enum | eStatus { HTTP_OK = 200 , HTTP_BAD_REQUEST = 400 } |
Protected Types inherited from cHTTPMessage | |
using | cNameValueMap = std::map< AString, AString > |
Protected Attributes inherited from cHTTPMessage | |
size_t | m_ContentLength |
Length of the content that is to be received. More... | |
AString | m_ContentType |
Type of the content; parsed by AddHeader(), set directly by SetContentLength() More... | |
AStringMap | m_Headers |
Map of headers, with their keys lowercased. More... | |
eKind | m_Kind |
Stores outgoing response headers and serializes them to an HTTP data stream.
Definition at line 69 of file HTTPMessage.h.
|
private |
Definition at line 72 of file HTTPMessage.h.
cHTTPOutgoingResponse::cHTTPOutgoingResponse | ( | void | ) |
Definition at line 72 of file HTTPMessage.cpp.
void cHTTPOutgoingResponse::AppendToData | ( | AString & | a_DataStream | ) | const |
Appends the response to the specified datastream - response line and headers.
The body will be sent later directly through cConnection::Send()
Definition at line 81 of file HTTPMessage.cpp.