|
kaycxx-http
HTTP client library
|
HTTP form encoded as application/x-www-form-urlencoded. More...
#include <kaycxx/http/url_encoded_form.hpp>
Public Types | |
| using | field = std::pair<std::string, std::string> |
| Form field consisting of a name and value. | |
Public Member Functions | |
| url_encoded_form () noexcept | |
| Creates an empty URL-encoded form. | |
| url_encoded_form (std::initializer_list< field > fields) | |
| Creates a URL-encoded form with the specified fields. | |
| void | add (std::string_view name, std::string_view value) |
| Adds a form field. | |
Friends | |
| class | client |
HTTP form encoded as application/x-www-form-urlencoded.
| kaycxx::http::url_encoded_form::url_encoded_form | ( | std::initializer_list< field > | fields | ) |
Creates a URL-encoded form with the specified fields.
Field order and duplicate field names are preserved.
| fields | Form fields. |
| void kaycxx::http::url_encoded_form::add | ( | std::string_view | name, |
| std::string_view | value ) |
Adds a form field.
| name | Field name. |
| value | Field value. |