Home | All Classes | Main Classes | Annotated | Grouped Classes | Functions |
The TQHttpHeader class contains header information for HTTP. More...
#include <ntqhttp.h>
Inherited by TQHttpResponseHeader and TQHttpRequestHeader.
In most cases you should use the more specialized derivatives of this class, TQHttpResponseHeader and TQHttpRequestHeader, rather than directly using TQHttpHeader.
TQHttpHeader 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:
content-type: text/html
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.
header.setValue( "content-type", "text/html" ); TQString contentType = header.value( "content-type" );
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().
Each header key has a single value associated with it. If you set the value for a key which already exists the previous value will be discarded.
See also TQHttpRequestHeader, TQHttpResponseHeader, and Input/Output and Networking.
This constructor parses the string str for header fields and adds this information. The str should consist of one or more "\r\n" delimited lines; each of these lines should have the format key, colon, space, value.
See also setContentLength() and hasContentLength().
See also setContentType() and hasContentType().
See also contentLength() and setContentLength().
See also contentType() and setContentType().
See also value(), setValue(), and keys().
A TQHttpHeader is invalid if it was created by parsing a malformed string.
See also hasKey().
Returns the major protocol-version of the HTTP header.
Reimplemented in TQHttpResponseHeader and TQHttpRequestHeader.
Returns the minor protocol-version of the HTTP header.
Reimplemented in TQHttpResponseHeader and TQHttpRequestHeader.
See also value() and setValue().
See also contentLength() and hasContentLength().
See also contentType() and hasContentType().
Example: network/archivesearch/archivedialog.ui.h.
If no entry with key exists, a new entry with the given key and value is created. If an entry with the key already exists, its value is discarded and replaced with the given value.
See also value(), hasKey(), and removeValue().
Example: network/archivesearch/archivedialog.ui.h.
The string is suitable for use by the constructor that takes a TQString. It consists of lines with the format: key, colon, space, value, "\r\n".
See also setValue(), removeValue(), hasKey(), and keys().
This file is part of the TQt toolkit. Copyright © 1995-2007 Trolltech. All Rights Reserved.
Copyright © 2007 Trolltech | Trademarks | TQt 3.3.8
|