Template Struct multipart_form¶
Defined in File form.hxx
Struct Documentation¶
-
template<typename
Iterator>
structudho::multipart_form¶ Form accessor for multipart forms
Public Types
-
typedef std::iterator_traits<iterator_type>::value_type
value_type¶
-
typedef std::basic_string<value_type>
string_type¶
-
typedef bounded_str<iterator_type>
bounded_string_type¶
-
typedef std::map<string_type, bounded_string_type>
header_map_type¶
-
typedef bounded_string_type
bounded_string¶
Public Functions
-
void
parse(const std::string &boundary, iterator_type begin, iterator_type end)¶
-
void
parse_part(iterator_type begin, iterator_type end)¶
-
std::size_t
count() const¶ number of fields in the form
-
bool
has(const std::string name) const¶ checks whether the form has any field with the given name
-
struct
form_part¶ A part in the multipart form data
Public Functions
-
form_part(iterator_type begin, iterator_type end)¶
-
void
set_header(const header_map_type &headers)¶
-
const bounded_string_type &
header(const std::string &key) const¶ returns the value associated with the key in the header of the part
header("Content-Disposition").copied<std::string>();
-
bounded_string_type
header(const std::string &key, const std::string &sub) const¶ returns the value associated with the key and sub key in the header of the part
header("Content-Disposition", "name").copied<std::string>();
-
bounded_string_type
name() const¶ name of the part
name().copied<std::string>();
-
bounded_string_type
filename() const¶ filename of the part
name().copied<std::string>();
-
const bounded_string_type &
body() const¶ body of the part returned as a pair of string iterators
body().copied<std::string>();
-
std::string
str() const¶ returns the body of the part as string
-
-
typedef std::iterator_traits<iterator_type>::value_type