noos::cloud::http_post Class Reference
use to store and pass POST data and realted info More...
#include <http_post.hpp>
Public Member Functions | |
http_post (std::string boundary) | |
preferred constructor More... | |
void | add_content (const std::string name, const std::string content, bool newline) |
add multipart/form-data content to the POST data More... | |
void | add_content (const std::string name, const std::string filename, const std::vector< noos::types::byte > bytes) |
adding content to the POST data More... | |
void | end () |
call once, closes the POST boundary | |
std::string | to_string () const |
get the POST | |
unsigned int | size () const |
get POST data Content-Length | |
Detailed Description
use to store and pass POST data and realted info
- Version
- 0.7.0
- Date
- August 2016
Constructor & Destructor Documentation
noos::cloud::http_post::http_post | ( | std::string | boundary | ) |
preferred constructor
- Parameters
-
boundary must be obtained from http_header::get_boundary()
- See also
- http_header
Member Function Documentation
void noos::cloud::http_post::add_content | ( | const std::string | name, |
const std::string | content, | ||
bool | newline | ||
) |
add multipart/form-data content to the POST data
- Parameters
-
name of the form content is the value newline adds newline return at the end of content
void noos::cloud::http_post::add_content | ( | const std::string | name, |
const std::string | filename, | ||
const std::vector< noos::types::byte > | bytes | ||
) |
adding content to the POST data
- Parameters
-
name is the name of the string variable filename which want to use vector contains the data of the file in binary type
- Warning
- it will add newline return after the bytes
The documentation for this class was generated from the following file:
- noos/cloud/asio/http_post.hpp