API New Year  1.0
API for the project ZIA, EPITECH 2017.
ApiNewYear::IHttpResponse Class Referenceabstract

Base class representing the minimum information needed for each HTTP Response. More...

#include <IHttpResponse.h>

Inheritance diagram for ApiNewYear::IHttpResponse:
Inheritance graph
Collaboration diagram for ApiNewYear::IHttpResponse:
Collaboration graph

Public Member Functions

virtual int getCode (void) const =0
 Getter for status code. More...
 
virtual void setCode (int code)=0
 Setter for status code. More...
 
virtual const std::string & getMessage (void) const =0
 Getter for http reason phrase. More...
 
virtual void setMessage (const std::string &message)=0
 Setter for http reason phrase. More...
 
- Public Member Functions inherited from ApiNewYear::IHttpQuery
virtual void setData (const std::string &data)=0
 Setter for Data. More...
 
virtual const std::string & getData (void) const =0
 Getter for Data. More...
 
virtual const std::map< std::string, std::string > & getHeaders (void) const =0
 Getter for map of headers. More...
 
virtual void addHeader (const std::string &key, const std::string &value)=0
 Add header to map of headers. More...
 
virtual void removeHeader (const std::string &key)=0
 Remove header from map of headers. More...
 

Detailed Description

Base class representing the minimum information needed for each HTTP Response.

Establishes the base architecture for all HTTP Responses used by the server.

Member Function Documentation

virtual int ApiNewYear::IHttpResponse::getCode ( void  ) const
pure virtual

Getter for status code.

IHttpResponse get http status code.

Returns
an integer representing the http status code.
virtual const std::string& ApiNewYear::IHttpResponse::getMessage ( void  ) const
pure virtual

Getter for http reason phrase.

IHttpResponse get string containing http reason phrase representing the status code for HTTP Response.

Returns
a constant string reference containing the reason phrase.
virtual void ApiNewYear::IHttpResponse::setCode ( int  code)
pure virtual

Setter for status code.

IHttpResponse set status code

Parameters
codeinteger representing the http status code.
virtual void ApiNewYear::IHttpResponse::setMessage ( const std::string &  message)
pure virtual

Setter for http reason phrase.

IHttpResponse set reason phrase representing the status code for HTTP Response.

Parameters
messagea constant string reference containing the reason phrase.

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