A Custom Base HTTP Request.
More...
#include <FormRequest.h>
|
virtual | ~FormRequest () |
| Destroy this BaseReuqest.
|
|
void | addFormField (const std::string &name, const std::string &value) |
| Add a name value pair to upload with this request. More...
|
|
void | setFormField (const std::string &name, const std::string &value) |
| Set a name value pair to upload with this request. More...
|
|
void | addFormFields (const Poco::Net::NameValueCollection &formFields) |
| Add additional form fields. More...
|
|
void | addFormFields (const std::multimap< std::string, std::string > &formFields) |
| Add additional form fields. More...
|
|
void | clearFormFields () |
| Clear all form fields.
|
|
| Request (const std::string &method, const std::string &uri, const std::string &httpVersion) |
| Construct an Request. More...
|
|
virtual | ~Request () |
| Destroy this Request.
|
|
virtual void | write (std::ostream &ostr) const |
| Write the HTTPRequest to an output stream. More...
|
|
void | setRequestId (const std::string &requestId) |
| Set the id of the request. More...
|
|
const std::string & | getRequestId () const |
| Get the id of the request. More...
|
|
const Poco::Net::HTMLForm & | form () const |
| Get a const reference to the raw form data. More...
|
|
int64_t | estimatedContentLength () const |
| Get the estimated content length for progress estimation purposes. More...
|
|
|
static const std::string | DEFAULT_MEDIA_TYPE = "application/octet-stream" |
| The default MIME type.
|
|
A Custom Base HTTP Request.
◆ addFormField()
void ofx::HTTP::FormRequest::addFormField |
( |
const std::string & |
name, |
|
|
const std::string & |
value |
|
) |
| |
Add a name value pair to upload with this request.
When form fields are added to anything other then POST and PUT requests, the form fields will be converted to query parameters and appended to the URI before request submission.
- Parameters
-
name | The field name. |
value | The field value. |
◆ addFormFields() [1/2]
void ofx::HTTP::FormRequest::addFormFields |
( |
const Poco::Net::NameValueCollection & |
formFields | ) |
|
Add additional form fields.
When form fields are added to anything other then POST and PUT requests, the form fields will be converted to query parameters and appended to the URI before request submission.
- Parameters
-
formFields | The form fields to add. |
◆ addFormFields() [2/2]
void ofx::HTTP::FormRequest::addFormFields |
( |
const std::multimap< std::string, std::string > & |
formFields | ) |
|
Add additional form fields.
When form fields are added to anything other then POST and PUT requests, the form fields will be converted to query parameters and appended to the URI before request submission.
- Parameters
-
formFields | The form fields to add. |
◆ setFormField()
void ofx::HTTP::FormRequest::setFormField |
( |
const std::string & |
name, |
|
|
const std::string & |
value |
|
) |
| |
Set a name value pair to upload with this request.
When form fields are added to anything other then POST and PUT requests, the form fields will be converted to query parameters and appended to the URI before request submission.
- Parameters
-
name | The field name. |
value | The field value. |
The documentation for this class was generated from the following files: