libinet++
A networking library for humans that code in C++
 All Classes Functions
HTTP Class Reference

Public Member Functions

 HTTP ()
 
 HTTP (std::string _server, unsigned int _port)
 
void add_header (std::string name, std::string value)
 
std::vector< std::vector
< std::string > > 
parse_headers ()
 
HTTP_Response request (std::string type, std::string location, std::string body="")
 

Public Attributes

std::string server
 
unsigned int port
 
std::vector< std::vector
< std::string > > 
headers
 

Constructor & Destructor Documentation

HTTP::HTTP ( )

HTTP class constructor.

Member Function Documentation

void HTTP::add_header ( std::string  name,
std::string  value 
)

Adds a header to the header list.

Parameters
nameHeader name.
valueHeader value.
vector< vector< string > > HTTP::parse_headers ( )

Parse HTTP headers.

Returns
Vector of string vectors (name, value).
HTTP_Response HTTP::request ( std::string  type,
std::string  location,
std::string  body = "" 
)

Request something from a server.

Parameters
locationThe location of something in a server.
Returns
HTTP_Response instance.

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