Logo Search packages:      
Sourcecode: poco version File versions  Download package

Poco::Net::HTMLForm Class Reference

#include <HTMLForm.h>

Inheritance diagram for Poco::Net::HTMLForm:


List of all members.

Detailed Description

HTMLForm is a helper class for working with HTML forms, both on the client and on the server side.

Definition at line 59 of file HTMLForm.h.

Public Types

typedef HeaderMap::const_iterator ConstIterator
typedef std::multimap
< std::string, std::string,
ILT > 
typedef HeaderMap::iterator Iterator

Public Member Functions

void add (const std::string &name, const std::string &value)
 Sets the value of the (first) name-value pair with the given name.
void addPart (const std::string &name, PartSource *pSource)
 Returns the encoding used for posting the form.
ConstIterator begin () const
const std::string & boundary () const
void clear ()
 Removes all name-value pairs with the given name.
bool empty () const
ConstIterator end () const
void erase (const std::string &name)
ConstIterator find (const std::string &name) const
const std::string & get (const std::string &name, const std::string &defaultValue) const
const std::string & get (const std::string &name) const
 Adds a new name-value pair with the given name and value.
const std::string & getEncoding () const
bool has (const std::string &name) const
 HTMLForm (const HTTPRequest &request)
 HTMLForm (const HTTPRequest &request, std::istream &requestBody)
 HTMLForm (const HTTPRequest &request, std::istream &requestBody, PartHandler &handler)
 HTMLForm (const std::string &encoding)
void load (const HTTPRequest &request)
void load (const HTTPRequest &request, std::istream &requestBody)
void load (const HTTPRequest &request, std::istream &requestBody, PartHandler &handler)
const std::string & operator[] (const std::string &name) const
 Swaps the NameValueCollection with another one.
void prepareSubmit (HTTPRequest &request)
void read (std::istream &istr, PartHandler &handler)
void set (const std::string &name, const std::string &value)
void setEncoding (const std::string &encoding)
 Destroys the HTMLForm.
int size () const
 Returns true iff the header does not have any content.
void swap (NameValueCollection &nvc)
 Assigns the name-value pairs of another NameValueCollection to this one.
void write (std::ostream &ostr)
void write (std::ostream &ostr, const std::string &boundary)
 ~HTMLForm ()

Static Public Attributes

static const std::string ENCODING_MULTIPART = "multipart/form-data"
static const std::string ENCODING_URL = "application/x-www-form-urlencoded"

Protected Member Functions

void readMultipart (std::istream &istr, PartHandler &handler)
void readUrl (std::istream &istr)
void writeMultipart (std::ostream &ostr)
void writeUrl (std::ostream &ostr)

Private Types

typedef std::vector< Part > PartVec

Private Member Functions

 HTMLForm (const HTMLForm &)
HTMLFormoperator= (const HTMLForm &)

Private Attributes

std::string _boundary
std::string _encoding
PartVec _parts


struct  Part

The documentation for this class was generated from the following files:

Generated by  Doxygen 1.6.0   Back to index