Cuberite
A lightweight, fast and extensible game server for Minecraft
Public Member Functions | Private Types | List of all members
cHTTPOutgoingResponse Class Reference

Stores outgoing response headers and serializes them to an HTTP data stream. More...

#include <HTTPMessage.h>

Inheritance diagram for cHTTPOutgoingResponse:
Inheritance graph
[legend]
Collaboration diagram for cHTTPOutgoingResponse:
Collaboration graph
[legend]

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 AStringGetContentType (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
 

Detailed Description

Stores outgoing response headers and serializes them to an HTTP data stream.

Definition at line 69 of file HTTPMessage.h.

Member Typedef Documentation

◆ Super

Definition at line 72 of file HTTPMessage.h.

Constructor & Destructor Documentation

◆ cHTTPOutgoingResponse()

cHTTPOutgoingResponse::cHTTPOutgoingResponse ( void  )

Definition at line 72 of file HTTPMessage.cpp.

Member Function Documentation

◆ AppendToData()

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.


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