ESA JPIP server  0.1
http::Response Class Reference

Class used to identify a HTTP response. More...

#include <response.h>

Collaboration diagram for http::Response:

Classes

class  StatusCodesInitializer
 Class used for the initializer. More...
 

Public Member Functions

 Response (int code=200, const Protocol &protocol=Protocol(1, 1))
 Initializes the response. More...
 

Public Attributes

int code
 Status code. More...
 
Protocol protocol
 Protocol version. More...
 

Static Public Attributes

static map< int, string > StatusCodes
 Map with the strings associated to the most commonly used status codes. More...
 

Static Private Attributes

static StatusCodesInitializer statusCodesInitializer
 The initializer of the StatusCodes member. More...
 

Friends

ostream & operator<< (ostream &out, const Response &response)
 
istream & operator>> (istream &in, Response &response)
 

Detailed Description

Class used to identify a HTTP response.

It is possible to use this class with standard streams.

See Also
Request

Constructor & Destructor Documentation

http::Response::Response ( int  code = 200,
const Protocol protocol = Protocol(1, 1) 
)
inline

Initializes the response.

Parameters
codeStatus code (200 by default).
protocolProtocol version (1.1 by default).

Friends And Related Function Documentation

ostream& operator<< ( ostream &  out,
const Response response 
)
friend
istream& operator>> ( istream &  in,
Response response 
)
friend

Member Data Documentation

int http::Response::code

Status code.

Protocol http::Response::protocol

Protocol version.

map< int, string > http::Response::StatusCodes
static

Map with the strings associated to the most commonly used status codes.

In order to use a new user defined status code, it is necessary to include in this map the associated string.

Response::StatusCodesInitializer http::Response::statusCodesInitializer
staticprivate

The initializer of the StatusCodes member.


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