Template Struct combo

Inheritance Relationships

Base Types

Struct Documentation

template<typename RequestT>
struct udho::forms::drivers::combo : private udho::forms::drivers::urlencoded_<RequestT::body_type::value_type::const_iterator>, private udho::forms::drivers::multipart_<RequestT::body_type::value_type::const_iterator>

Public Types

enum types

Values:

enumerator unparsed
enumerator urlencoded
enumerator multipart
typedef RequestT request_type
typedef urlencoded_<typename request_type::body_type::value_type::const_iterator> urlencoded_type
typedef multipart_<typename request_type::body_type::value_type::const_iterator> multipart_type
typedef request_type::body_type::value_type body_type

Public Functions

combo(const request_type &request)
void parse_urlencoded()

parse the beast request body as urlencoded form data

void parse_multipart()

parse the beast request body as multipart form data

bool is_urlencoded() const

check whether the submitted form is urlencoded

bool is_multipart() const

check whether the submitted form is multipart

const urlencoded_type &urlencoded() const
const multipart_type &multipart() const

return the multipart specific form accessor

bool empty(const std::string name) const

checks whether the value for the field is empty

bool exists(const std::string name) const

checks whether there exists any field with the name provided

template<typename T, typename ParserT = udho::forms::parser<T>>
bool parsable(const std::string &name) const
template<typename T, typename ParserT = udho::forms::parser<T>>
const T parsed(const std::string &name) const

returns the value of the field with the name provided lexically casted to type T

Public Members

const request_type &_request
types _type