#include <thttputility.h>
The THttpUtility class contains utility functions.
◆ fromFormUrlEncoded()
QList< QPair< QString, QString > > THttpUtility::fromFormUrlEncoded |
( |
const QByteArray & |
enc | ) |
|
|
static |
◆ fromHttpDateTimeString()
QDateTime THttpUtility::fromHttpDateTimeString |
( |
const QByteArray & |
localTime | ) |
|
|
static |
Parses the HTTP datetime array given in localTime and returns the datetime.
◆ fromHttpDateTimeUTCString()
QDateTime THttpUtility::fromHttpDateTimeUTCString |
( |
const QByteArray & |
utc | ) |
|
|
static |
Returns a byte array for Date field of an HTTP header, containing the UTC datetime equivalent of utc.
Parses the UTC datetime array given in utc and returns the datetime.
◆ fromMimeEncoded()
QString THttpUtility::fromMimeEncoded |
( |
const QByteArray & |
mime | ) |
|
|
static |
Returns a byte array copy of input, encoded as MIME-Base64.
- See also
- fromMimeEncoded(const QByteArray &)
Returns a decoded copy of the MIME-Base64 array mime.
- See also
- toMimeEncoded(const QString &, QTextCodec *)
◆ fromUrlEncoding()
QString THttpUtility::fromUrlEncoding |
( |
const QByteArray & |
enc | ) |
|
|
static |
◆ getResponseReasonPhrase()
QByteArray THttpUtility::getResponseReasonPhrase |
( |
int |
statusCode | ) |
|
|
static |
Returns a reason phrase of the HTTP status code statusCode.
◆ getUTCTimeString()
QByteArray THttpUtility::getUTCTimeString |
( |
| ) |
|
|
static |
◆ htmlEscape() [1/11]
◆ htmlEscape() [2/11]
◆ htmlEscape() [3/11]
Returns a converted copy of input.
All applicable characters in input are converted to HTML entities. The conversions performed are:
- & (ampersand) becomes &.
- " (double quote) becomes " when Tf::Compatible or Tf::Quotes is set.
- ' (single quote) becomes ' only when Tf::Quotes is set.
- < (less than) becomes <.
- > (greater than) becomes >.
◆ htmlEscape() [4/11]
◆ htmlEscape() [5/11]
QString THttpUtility::htmlEscape |
( |
double |
n | ) |
|
|
inlinestatic |
◆ htmlEscape() [6/11]
QString THttpUtility::htmlEscape |
( |
int |
n | ) |
|
|
inlinestatic |
◆ htmlEscape() [7/11]
QString THttpUtility::htmlEscape |
( |
long |
n | ) |
|
|
inlinestatic |
◆ htmlEscape() [8/11]
QString THttpUtility::htmlEscape |
( |
qlonglong |
n | ) |
|
|
inlinestatic |
◆ htmlEscape() [9/11]
QString THttpUtility::htmlEscape |
( |
qulonglong |
n | ) |
|
|
inlinestatic |
◆ htmlEscape() [10/11]
QString THttpUtility::htmlEscape |
( |
uint |
n | ) |
|
|
inlinestatic |
◆ htmlEscape() [11/11]
QString THttpUtility::htmlEscape |
( |
ulong |
n | ) |
|
|
inlinestatic |
◆ jsonEscape() [1/4]
QString THttpUtility::jsonEscape |
( |
const char * |
input | ) |
|
|
static |
◆ jsonEscape() [2/4]
QString THttpUtility::jsonEscape |
( |
const QByteArray & |
input | ) |
|
|
static |
◆ jsonEscape() [3/4]
QString THttpUtility::jsonEscape |
( |
const QString & |
input | ) |
|
|
static |
Returns a converted copy of input.
All applicable characters in input are converted to JSON representation. The conversions performed are:
- & (ampersand) becomes \u0026.
- < (less than) becomes \u003C.
- > (greater than) becomes \u003E.
◆ jsonEscape() [4/4]
QString THttpUtility::jsonEscape |
( |
const QVariant & |
input | ) |
|
|
static |
◆ timeZone()
QByteArray THttpUtility::timeZone |
( |
| ) |
|
|
static |
Returns the numeric timezone "[+|-]hhmm" of the current computer as a bytes array.
◆ toHttpDateTimeString()
QByteArray THttpUtility::toHttpDateTimeString |
( |
const QDateTime & |
dateTime | ) |
|
|
static |
Returns a byte array for Date field of an HTTP header, containing the datetime equivalent of localTime.
◆ toMimeEncoded() [1/2]
QByteArray THttpUtility::toMimeEncoded |
( |
const QString & |
input, |
|
|
const QByteArray & |
encoding = "UTF-8" |
|
) |
| |
|
static |
◆ toMimeEncoded() [2/2]
QByteArray THttpUtility::toMimeEncoded |
( |
const QString & |
input, |
|
|
QStringConverter::Encoding |
encoding |
|
) |
| |
|
static |
◆ toUrlEncoding()
QByteArray THttpUtility::toUrlEncoding |
( |
const QString & |
input, |
|
|
const QByteArray & |
exclude = "-._" |
|
) |
| |
|
static |
Returns an encoded copy of input.
input is first converted to UTF-8, and all ASCII-characters that are not in the unreserved group are URL encoded.
- See also
- fromUrlEncoding(const QByteArray &)
◆ trimmedQuotes()
QString THttpUtility::trimmedQuotes |
( |
const QString & |
string | ) |
|
|
inlinestatic |
Returns a string that has quotes removed from the start and the end.
The documentation for this class was generated from the following files: