tufao  1.3.0
An asynchronous web framework for C++ built on top of Qt
Tufao::Headers Struct Reference

This class provides a representation of HTTP headers. More...

+ Inheritance diagram for Tufao::Headers:
+ Collaboration diagram for Tufao::Headers:

Static Public Member Functions

static TUFAO_EXPORT QByteArray fromDateTime (const QDateTime &dateTime)
 Returns a RFC 1123 date time formatted string if dateTime. More...
 
static TUFAO_EXPORT QDateTime toDateTime (const QByteArray &headerValue, const QDateTime &defaultValue=QDateTime())
 Try to decode headerValue using the most common http date time formats. More...
 

Detailed Description

This class provides a representation of HTTP headers.

HTTP headers are string-based properties with case-insensitive keys.

See also
Tufao::IByteArray

Member Function Documentation

static TUFAO_EXPORT QByteArray Tufao::Headers::fromDateTime ( const QDateTime &  dateTime)
static

Returns a RFC 1123 date time formatted string if dateTime.

It's the standard date time format in HTTP.

Since
0.3
static TUFAO_EXPORT QDateTime Tufao::Headers::toDateTime ( const QByteArray &  headerValue,
const QDateTime &  defaultValue = QDateTime() 
)
static

Try to decode headerValue using the most common http date time formats.

These formats are:

  • RFC 1123
  • RFC 1036
  • ANSI C's asctime()
Returns
the converted QDateTime object or defaultValue if the conversion fails.
Since
0.3

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