Viadeo Twitter Google Bookmarks ! Facebook Digg del.icio.us MySpace Yahoo MyWeb Blinklist Netvouz Reddit Simpy StumbleUpon Bookmarks Windows Live Favorites 
Logo Documentation Qt ·  Page d'accueil  ·  Toutes les classes  ·  Toutes les fonctions  ·  Vues d'ensemble  · 

QHttpRequestHeader Class Reference

The QHttpRequestHeader class contains request header information for HTTP. More...

 #include <QHttpRequestHeader>

This class is obsolete. It is provided to keep old source code working. We strongly advise against using it in new code.

Inherits: QHttpHeader.

Public Functions

QHttpRequestHeader ()
QHttpRequestHeader ( const QString & method, const QString & path, int majorVer = 1, int minorVer = 1 )
QHttpRequestHeader ( const QHttpRequestHeader & header )
QHttpRequestHeader ( const QString & str )
QString method () const
QString path () const
void setRequest ( const QString & method, const QString & path, int majorVer = 1, int minorVer = 1 )
QHttpRequestHeader & operator= ( const QHttpRequestHeader & header )

Reimplemented Public Functions

virtual int majorVersion () const
virtual int minorVersion () const
virtual QString toString () const

Detailed Description

The QHttpRequestHeader class contains request header information for HTTP.

This class is used in the QHttp class to report the header information if the client requests something from the server.

HTTP requests have a method which describes the request's action. The most common requests are "GET" and "POST". In addition to the request method the header also includes a request-URI to specify the location for the method to use.

The method, request-URI and protocol-version can be set using a constructor or later using setRequest(). The values can be obtained using method(), path(), majorVersion() and minorVersion().

Note that the request-URI must be in the format expected by the HTTP server. That is, all reserved characters must be encoded in %HH (where HH are two hexadecimal digits). See QUrl::toPercentEncoding() for more information.

Important inherited functions: setValue() and value().

See also QHttpResponseHeader and QHttp.

Member Function Documentation

QHttpRequestHeader::QHttpRequestHeader ()

Constructs an empty HTTP request header.

QHttpRequestHeader::QHttpRequestHeader ( const QString & method, const QString & path, int majorVer = 1, int minorVer = 1 )

Constructs a HTTP request header for the method method, the request-URI path and the protocol-version majorVer and minorVer. The path argument must be properly encoded for an HTTP request.

QHttpRequestHeader::QHttpRequestHeader ( const QHttpRequestHeader & header )

Constructs a copy of header.

QHttpRequestHeader::QHttpRequestHeader ( const QString & str )

Constructs a HTTP request header from the string str. The str should consist of one or more "\r\n" delimited lines; the first line should be the request-line (format: method, space, request-URI, space HTTP-version); each of the remaining lines should have the format key, colon, space, value.

int QHttpRequestHeader::majorVersion () const [virtual]

Reimplemented from QHttpHeader::majorVersion().

Returns the major protocol-version of the HTTP request header.

See also minorVersion(), method(), path(), and setRequest().

QString QHttpRequestHeader::method () const

Returns the method of the HTTP request header.

See also path(), majorVersion(), minorVersion(), and setRequest().

int QHttpRequestHeader::minorVersion () const [virtual]

Reimplemented from QHttpHeader::minorVersion().

Returns the minor protocol-version of the HTTP request header.

See also majorVersion(), method(), path(), and setRequest().

QString QHttpRequestHeader::path () const

Returns the request-URI of the HTTP request header.

See also method(), majorVersion(), minorVersion(), and setRequest().

void QHttpRequestHeader::setRequest ( const QString & method, const QString & path, int majorVer = 1, int minorVer = 1 )

This function sets the request method to method, the request-URI to path and the protocol-version to majorVer and minorVer. The path argument must be properly encoded for an HTTP request.

See also method(), path(), majorVersion(), and minorVersion().

QString QHttpRequestHeader::toString () const [virtual]

Reimplemented from QHttpHeader::toString().

QHttpRequestHeader & QHttpRequestHeader::operator= ( const QHttpRequestHeader & header )

Copies the content of header into this QHttpRequestHeader

Cette page est une traduction d'une page de la documentation de Qt, écrite par Nokia Corporation and/or its subsidiary(-ies). Les éventuels problèmes résultant d'une mauvaise traduction ne sont pas imputables à Nokia. Qt 4.8
Copyright © 2012 Developpez LLC. Tous droits réservés Developpez LLC. Aucune reproduction, même partielle, ne peut être faite de ce site et de l'ensemble de son contenu : textes, documents et images sans l'autorisation expresse de Developpez LLC. Sinon, vous encourez selon la loi jusqu'à 3 ans de prison et jusqu'à 300 000 E de dommages et intérêts. Cette page est déposée à la SACD.
Vous avez déniché une erreur ? Un bug ? Une redirection cassée ? Ou tout autre problème, quel qu'il soit ? Ou bien vous désirez participer à ce projet de traduction ? N'hésitez pas à nous contacter ou par MP !
 
 
 
 
Partenaires

Hébergement Web