Home · Modules · All Classes · All Namespaces
Public Attributes | List of all members
Tp::HTTPPostData Struct Reference

#include <TelepathyQt/Types>

Public Attributes

QString key
 
QString value
 

Detailed Description

Structure type generated from the specification.

A pair (key, value) representing POST data compatible with the application/x-www-form-urlencoded MIME type. The strings MUST be valid UTF-8 strings, and the characters used in the key MUST obey the requirements of the HTML CDATA type. The value MUST NOT be encoded with HTML entities.

For example, if the POST data should contain a key "less-than" with value "<", and a key "percent" with value "%", this should be represented as two HTTP_Post_Data structures, ("less-than", "<") and ("percent", "%"), resulting in a POST request whose request body is "less-than=&lt;&percent=%25". If a client passes this to a browser by writing it into an HTML form, it could do so by representing it as:

<input type="hidden" name="less-than">&lt;</input>
<input type="hidden" name="percent">%</input>

This data can be used to generate a HTML file that will automatically load the URL with appropriate POST data, in which case the client MUST convert any characters that are special within HTML into HTML entities. Alternatively, it can be used in an API that will instruct the browser how to load the URL (like the Netscape Plug-in API), in which case the client MUST escape characters that are reserved in URLs, if appropriate for that API.

An array of pairs is used instead of a map from keys to values, because it's valid to repeat keys in both HTML and x-www-form-urlencoded data.

Member Data Documentation

◆ key

QString Tp::HTTPPostData::key

The key, corresponding to a HTML control name

◆ value

QString Tp::HTTPPostData::value

The value