You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
138 lines
5.7 KiB
138 lines
5.7 KiB
14 years ago
|
'\" t
|
||
|
.TH QHttpRequestHeader 3qt "2 February 2007" "Trolltech AS" \" -*- nroff -*-
|
||
|
.\" Copyright 1992-2007 Trolltech ASA. All rights reserved. See the
|
||
|
.\" license file included in the distribution for a complete license
|
||
|
.\" statement.
|
||
|
.\"
|
||
|
.ad l
|
||
|
.nh
|
||
|
.SH NAME
|
||
|
QHttpRequestHeader \- Request header information for HTTP
|
||
|
.SH SYNOPSIS
|
||
|
\fC#include <qhttp.h>\fR
|
||
|
.PP
|
||
|
Inherits QHttpHeader.
|
||
|
.PP
|
||
|
.SS "Public Members"
|
||
|
.in +1c
|
||
|
.ti -1c
|
||
|
.BI "\fBQHttpRequestHeader\fR ()"
|
||
|
.br
|
||
|
.ti -1c
|
||
|
.BI "\fBQHttpRequestHeader\fR ( const QString & method, const QString & path, int majorVer = 1, int minorVer = 1 )"
|
||
|
.br
|
||
|
.ti -1c
|
||
|
.BI "\fBQHttpRequestHeader\fR ( const QHttpRequestHeader & header )"
|
||
|
.br
|
||
|
.ti -1c
|
||
|
.BI "\fBQHttpRequestHeader\fR ( const QString & str )"
|
||
|
.br
|
||
|
.ti -1c
|
||
|
.BI "void \fBsetRequest\fR ( const QString & method, const QString & path, int majorVer = 1, int minorVer = 1 )"
|
||
|
.br
|
||
|
.ti -1c
|
||
|
.BI "QString \fBmethod\fR () const"
|
||
|
.br
|
||
|
.ti -1c
|
||
|
.BI "QString \fBpath\fR () const"
|
||
|
.br
|
||
|
.ti -1c
|
||
|
.BI "virtual int \fBmajorVersion\fR () const"
|
||
|
.br
|
||
|
.ti -1c
|
||
|
.BI "virtual int \fBminorVersion\fR () const"
|
||
|
.br
|
||
|
.in -1c
|
||
|
.SS "Important Inherited Members"
|
||
|
.in +1c
|
||
|
.ti -1c
|
||
|
.BI "QString \fBvalue\fR ( const QString & key ) const"
|
||
|
.br
|
||
|
.ti -1c
|
||
|
.BI "void \fBsetValue\fR ( const QString & key, const QString & value )"
|
||
|
.br
|
||
|
.in -1c
|
||
|
.SH DESCRIPTION
|
||
|
The QHttpRequestHeader class contains request header information for HTTP.
|
||
|
.PP
|
||
|
This class is used in the QHttp class to report the header information if the client requests something from the server.
|
||
|
.PP
|
||
|
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.
|
||
|
.PP
|
||
|
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().
|
||
|
.PP
|
||
|
This class is a QHttpHeader subclass so that class's functions, e.g. setValue(), value(), etc. are also available.
|
||
|
.PP
|
||
|
See also QHttpResponseHeader, QHttp, and Input/Output and Networking.
|
||
|
.PP
|
||
|
.SH MEMBER FUNCTION DOCUMENTATION
|
||
|
.SH "QHttpRequestHeader::QHttpRequestHeader ()"
|
||
|
Constructs an empty HTTP request header.
|
||
|
.SH "QHttpRequestHeader::QHttpRequestHeader ( const QString & method, const QString & path, int majorVer = 1, int minorVer = 1 )"
|
||
|
Constructs a HTTP request header for the method \fImethod\fR, the request-URI \fIpath\fR and the protocol-version \fImajorVer\fR and \fIminorVer\fR.
|
||
|
.SH "QHttpRequestHeader::QHttpRequestHeader ( const QHttpRequestHeader & header )"
|
||
|
Constructs a copy of \fIheader\fR.
|
||
|
.SH "QHttpRequestHeader::QHttpRequestHeader ( const QString & str )"
|
||
|
Constructs a HTTP request header from the string \fIstr\fR. The \fIstr\fR 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.
|
||
|
.SH "int QHttpRequestHeader::majorVersion () const\fC [virtual]\fR"
|
||
|
Returns the major protocol-version of the HTTP request header.
|
||
|
.PP
|
||
|
See also minorVersion(), method(), path(), and setRequest().
|
||
|
.PP
|
||
|
Reimplemented from QHttpHeader.
|
||
|
.SH "QString QHttpRequestHeader::method () const"
|
||
|
Returns the method of the HTTP request header.
|
||
|
.PP
|
||
|
See also path(), majorVersion(), minorVersion(), and setRequest().
|
||
|
.SH "int QHttpRequestHeader::minorVersion () const\fC [virtual]\fR"
|
||
|
Returns the minor protocol-version of the HTTP request header.
|
||
|
.PP
|
||
|
See also majorVersion(), method(), path(), and setRequest().
|
||
|
.PP
|
||
|
Reimplemented from QHttpHeader.
|
||
|
.SH "QString QHttpRequestHeader::path () const"
|
||
|
Returns the request-URI of the HTTP request header.
|
||
|
.PP
|
||
|
See also method(), majorVersion(), minorVersion(), and setRequest().
|
||
|
.SH "void QHttpRequestHeader::setRequest ( const QString & method, const QString & path, int majorVer = 1, int minorVer = 1 )"
|
||
|
This function sets the request method to \fImethod\fR, the request-URI to \fIpath\fR and the protocol-version to \fImajorVer\fR and \fIminorVer\fR.
|
||
|
.PP
|
||
|
See also method(), path(), majorVersion(), and minorVersion().
|
||
|
.SH "void QHttpHeader::setValue ( const QString & key, const QString & value )"
|
||
|
Sets the value of the entry with the \fIkey\fR to \fIvalue\fR.
|
||
|
.PP
|
||
|
If no entry with \fIkey\fR exists, a new entry with the given \fIkey\fR and \fIvalue\fR is created. If an entry with the \fIkey\fR already exists, its value is discarded and replaced with the given \fIvalue\fR.
|
||
|
.PP
|
||
|
See also value(), hasKey(), and removeValue().
|
||
|
.PP
|
||
|
Example: network/archivesearch/archivedialog.ui.h.
|
||
|
.SH "QString QHttpHeader::value ( const QString & key ) const"
|
||
|
Returns the value for the entry with the given \fIkey\fR. If no entry has this \fIkey\fR, an empty string is returned.
|
||
|
.PP
|
||
|
See also setValue(), removeValue(), hasKey(), and keys().
|
||
|
|
||
|
.SH "SEE ALSO"
|
||
|
.BR http://doc.trolltech.com/qhttprequestheader.html
|
||
|
.BR http://www.trolltech.com/faq/tech.html
|
||
|
.SH COPYRIGHT
|
||
|
Copyright 1992-2007 Trolltech ASA, http://www.trolltech.com. See the
|
||
|
license file included in the distribution for a complete license
|
||
|
statement.
|
||
|
.SH AUTHOR
|
||
|
Generated automatically from the source code.
|
||
|
.SH BUGS
|
||
|
If you find a bug in Qt, please report it as described in
|
||
|
.BR http://doc.trolltech.com/bughowto.html .
|
||
|
Good bug reports help us to help you. Thank you.
|
||
|
.P
|
||
|
The definitive Qt documentation is provided in HTML format; it is
|
||
|
located at $QTDIR/doc/html and can be read using Qt Assistant or with
|
||
|
a web browser. This man page is provided as a convenience for those
|
||
|
users who prefer man pages, although this format is not officially
|
||
|
supported by Trolltech.
|
||
|
.P
|
||
|
If you find errors in this manual page, please report them to
|
||
|
.BR qt-bugs@trolltech.com .
|
||
|
Please include the name of the manual page (qhttprequestheader.3qt) and the Qt
|
||
|
version (3.3.8).
|