The parsed multipart request/response. More...
Public Member Functions | |
const std::string & | get_header_value (const std::string &key) const |
part | get_part_by_name (const std::string &name) |
std::string | dump () const override |
Represent all parts as a string (does not include message headers) More... | |
std::string | dump (int part_) const |
Represent an individual part as a string. More... | |
message (const ci_map &headers, const std::string &boundary, const std::vector< part > §ions) | |
Default constructor using default values. More... | |
message (const request &req) | |
Create a multipart message from a request data. More... | |
Public Attributes | |
ci_map | headers |
The request/response headers. More... | |
std::string | boundary |
The text boundary that separates different parts More... | |
std::vector< part > | parts |
The individual parts of the message. More... | |
mp_map | part_map |
The individual parts of the message, organized in a map with the name header parameter being the key. More... | |
std::string | content_type |
Private Member Functions | |
std::string | get_boundary (const std::string &header) const |
void | parse_body (std::string body, std::vector< part > §ions, mp_map &part_map) |
part | parse_section (std::string §ion) |
void | parse_section_head (std::string &lines, part &part) |
std::string | trim (std::string &string, const char &excess='"') const |
std::string | pad (std::string &string, const char &padding='"') const |
The parsed multipart request/response.
|
inline |
Default constructor using default values.
|
inline |
Create a multipart message from a request data.
|
inline |
|
inline |
|
inlineoverridevirtual |
Represent all parts as a string (does not include message headers)
Implements crow::returnable.
|
inline |
Represent an individual part as a string.
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
ci_map crow::multipart::message::headers |
The request/response headers.
std::string crow::multipart::message::boundary |
The text boundary that separates different parts
std::vector<part> crow::multipart::message::parts |
The individual parts of the message.
mp_map crow::multipart::message::part_map |
The individual parts of the message, organized in a map with the name
header parameter being the key.
|
inherited |