.BI "void \fBsetContentType\fR ( const QString & type )"
.br
.ti -1c
.BI "virtual QString \fBtoString\fR () const"
.br
.ti -1c
.BI "bool \fBisValid\fR () const"
.br
.ti -1c
.BI "virtual int \fBmajorVersion\fR () const = 0"
.br
.ti -1c
.BI "virtual int \fBminorVersion\fR () const = 0"
.br
.in -1c
.SH DESCRIPTION
The QHttpHeader class contains header information for HTTP.
.PP
In most cases you should use the more specialized derivatives of this class, QHttpResponseHeader and QHttpRequestHeader, rather than directly using QHttpHeader.
.PP
QHttpHeader provides the HTTP header fields. A HTTP header field consists of a name followed by a colon, a single space, and the field value. (See RFC 1945.) Field names are case-insensitive. A typical header field looks like this:
.PP
.nf
.br
content-type: text/html
.br
.fi
.PP
In the API the header field name is called the "key" and the content is called the "value". You can get and set a header field's value by using its key with value() and setValue(), e.g.
Some fields are so common that getters and setters are provided for them as a convenient alternative to using value() and setValue(), e.g. contentLength() and contentType(), setContentLength() and setContentType().
.PP
Each header key has a \fIsingle\fR value associated with it. If you set the value for a key which already exists the previous value will be discarded.
.PP
See also QHttpRequestHeader, QHttpResponseHeader, and Input/Output and Networking.
This constructor parses the string \fIstr\fR for header fields and adds this information. The \fIstr\fR should consist of one or more" \\r\\n" delimited lines; each of these lines should have the format key, colon, space, 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.