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

Base class representing the minimum information needed for each HTTP Query (Request or Response) More...

#include <IHttpQuery.h>

Inheritance diagram for ApiNewYear::IHttpQuery:
Inheritance graph
Collaboration diagram for ApiNewYear::IHttpQuery:
Collaboration graph

Public Member Functions

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 Query (Request or Response)

Establishes the base architecture for all HTTP Queries used by the server, to be used for Requests and Responses.

Member Function Documentation

virtual void ApiNewYear::IHttpQuery::addHeader ( const std::string &  key,
const std::string &  value 
)
pure virtual

Add header to map of headers.

IHttpQuery adds a header to the map of headers for use by the http protocol.

Parameters
keystring representing header name, used as map key.
valuestring representing header value, used as map value.
virtual const std::string& ApiNewYear::IHttpQuery::getData ( void  ) const
pure virtual

Getter for Data.

IHttpQuery get data used for the http protocol.

Returns
a const string reference of the data.
virtual const std::map<std::string, std::string>& ApiNewYear::IHttpQuery::getHeaders ( void  ) const
pure virtual

Getter for map of headers.

IHttpQuery get a map of headers used for Http Queries.

Returns
a constant map reference containing all the headers currently set for the http protocol.
virtual void ApiNewYear::IHttpQuery::removeHeader ( const std::string &  key)
pure virtual

Remove header from map of headers.

IHttpQuery removes the specified header from the map of headers if found.

Parameters
keystring representing header name, used as map key.
virtual void ApiNewYear::IHttpQuery::setData ( const std::string &  data)
pure virtual

Setter for Data.

IHttpQuery set data used for the http protocol.

Parameters
dataa constant string reference of the data for the http protocol.

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