Struct multipart_form::form_part

Nested Relationships

This struct is a nested type of Template Struct multipart_form.

Struct Documentation

struct udho::multipart_form::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>();

template<typename StrT>
StrT copied() const
std::string str() const

returns the body of the part as string

template<typename T>
T value() const

lexically convert the contents of the body to the requested type

Public Members

header_map_type _headers
bounded_string_type _body