#include <drogon/MultiPart.h>
|
|
| MultiPartParser (const MultiPartParser &other)=default |
|
| MultiPartParser (MultiPartParser &&other)=default |
| const std::vector< HttpFile > & | getFiles () const |
|
std::unordered_map< std::string, HttpFile > | getFilesMap () const |
| | Get files in a map, the keys of the map are item names of the files.
|
| const SafeStringMap< std::string > & | getParameters () const |
| template<typename T> |
| std::optional< T > | getOptionalParameter (const std::string &key) |
| template<typename T> |
| T | getParameter (const std::string &key) |
|
int | parse (const HttpRequestPtr &req) |
| | Parse the http request stream to get files and parameters.
|
|
|
int | parse (const HttpRequestPtr &req, const char *boundaryData, size_t boundaryLen) |
|
int | parseEntity (const HttpRequestPtr &req, const char *begin, const char *end) |
|
|
std::vector< HttpFile > | files_ |
|
SafeStringMap< std::string > | parameters_ |
A parser class which help the user to get the files and the parameters in the multipart format request.
◆ getFiles()
| const std::vector< HttpFile > & drogon::MultiPartParser::getFiles |
( |
| ) |
const |
Get files, This method should be called after calling the parse() method.
◆ getOptionalParameter()
template<typename T>
| std::optional< T > drogon::MultiPartParser::getOptionalParameter |
( |
const std::string & | key | ) |
|
|
inline |
Get the value of an optional parameter This method should be called after calling the parse() method.
◆ getParameter()
template<typename T>
| T drogon::MultiPartParser::getParameter |
( |
const std::string & | key | ) |
|
|
inline |
Get the value of a parameter This method should be called after calling the parse() method. Note: returns a default T object if the parameter is missing
◆ getParameters()
| const SafeStringMap< std::string > & drogon::MultiPartParser::getParameters |
( |
| ) |
const |
Get parameters, This method should be called after calling the parse () method.
The documentation for this class was generated from the following file: