kaycxx-http
HTTP client library
Loading...
Searching...
No Matches
kaycxx::http::url_encoded_form Class Reference

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

Detailed Description

HTTP form encoded as application/x-www-form-urlencoded.

Constructor & Destructor Documentation

◆ url_encoded_form()

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.

Parameters
fieldsForm fields.

Member Function Documentation

◆ add()

void kaycxx::http::url_encoded_form::add ( std::string_view name,
std::string_view value )

Adds a form field.

Parameters
nameField name.
valueField value.

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