noos::cloud::http_request Class Reference

nooser for the classes http_header &http_post used for cloud requests More...

#include <http_request.hpp>

Public Member Functions

 http_request (const std::string uri)
 construct a cloud HTTP request (multipart/form-data)
 
 http_request (const std::string uri, bool keep_alive)
 construct a cloud HTTP request (multipart/form-data) with keep_alive param
 
 http_request (const http_request &arg)
 copy constructor
 
void fill_buffer (boost::asio::streambuf &buffer, noos::cloud::platform info)
 fill the socket streambuf with the request header and post data More...
 
template<typename... Args>
void add_content (Args...args)
 add multiple content to the post with HTTP Protocol
 
void close ()
 close this request properly More...
 
std::string to_string (noos::cloud::platform info) const
 translate noos::cloud::platform parameters into a string with HTTP Protocol format
 
std::string to_post () const
 translate post data into a string with HTTP Protocol format
 
bool operator== (const http_request &rhs) const
 compare if two http_request are equal
 
void make_multipart_form ()
 make this a multipart-form, by creating the correct header fields, boundaries and multipart entries
 

Detailed Description

nooser for the classes http_header &http_post used for cloud requests

Version
0.7.3
Date
12 August 2016
Inheritance diagram for noos::cloud::http_request:

Member Function Documentation

void noos::cloud::http_request::fill_buffer ( boost::asio::streambuf &  buffer,
noos::cloud::platform  info 
)

fill the socket streambuf with the request header and post data

Parameters
requestis a reference to the socket streambuf being modified
infois the platform endpoint (address, port, etc)
Note
this method will modify the header by setting the HOST, PORT and TOKEN
use this method to satisfy virtual caller::fill_buffer polymorphism
void noos::cloud::http_request::close ( )

close this request properly

Warning
a non-closed HTTP request is an illegal one!

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