Qyoto
4.0.5
Qyoto is a C# language binding for Qt
|
The QHttpHeader class contains header information for HTTP. More...
Public Member Functions | |
QHttpHeader () | |
| |
QHttpHeader (QHttpHeader header) | |
| |
QHttpHeader (string str) | |
| |
virtual void | CreateProxy () |
new void | AddValue (string key, string value) |
| |
new System.Collections.Generic.List < string > | AllValues (string key) |
| |
new uint | ContentLength () |
| |
new bool | HasContentLength () |
| |
new bool | HasContentType () |
| |
new bool | HasKey (string key) |
| |
new bool | IsValid () |
| |
new System.Collections.Generic.List < string > | Keys () |
| |
abstract int | MajorVersion () |
| |
abstract int | MinorVersion () |
| |
new void | RemoveAllValues (string key) |
| |
new void | RemoveValue (string key) |
| |
new void | SetContentLength (int len) |
| |
new void | SetValue (string key, string value) |
| |
override string | ToString () |
| |
new string | Value (string key) |
| |
new void | Dispose () |
Protected Member Functions | |
QHttpHeader (System.Type dummy) | |
new bool | Parse (string str) |
virtual bool | ParseLine (string line, int number) |
new void | SetValid (bool arg1) |
Protected Attributes | |
SmokeInvocation | interceptor |
Properties | |
new string | ContentType [get, set] |
| |
virtual System.IntPtr | SmokeObject [get, set] |
The QHttpHeader class contains header information for HTTP.
In most cases you should use the more specialized derivatives of this class, QHttpResponseHeader and QHttpRequestHeader, rather than directly using QHttpHeader.
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:
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");
QString 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 QHttpRequestHeader and QHttpResponseHeader.
|
protected |
QtNetwork.QHttpHeader.QHttpHeader | ( | ) |
Constructs an empty HTTP header.
QtNetwork.QHttpHeader.QHttpHeader | ( | QHttpHeader | header | ) |
Constructs a copy of header.
QtNetwork.QHttpHeader.QHttpHeader | ( | string | str | ) |
Constructs a HTTP header for str.
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.
new void QtNetwork.QHttpHeader.AddValue | ( | string | key, |
string | value | ||
) |
Adds a new entry with the key and value.
new System.Collections.Generic.List<string> QtNetwork.QHttpHeader.AllValues | ( | string | key | ) |
Returns all the entries with the given key. If no entry has this key, an empty string list is returned.
new uint QtNetwork.QHttpHeader.ContentLength | ( | ) |
Returns the value of the special HTTP header field content-length.
See also setContentLength() and hasContentLength().
|
virtual |
Reimplemented in QtNetwork.QHttpResponseHeader, and QtNetwork.QHttpRequestHeader.
new void QtNetwork.QHttpHeader.Dispose | ( | ) |
new bool QtNetwork.QHttpHeader.HasContentLength | ( | ) |
Returns true if the header has an entry for the special HTTP header field content-length; otherwise returns false.
See also contentLength() and setContentLength().
new bool QtNetwork.QHttpHeader.HasContentType | ( | ) |
Returns true if the header has an entry for the special HTTP header field content-type; otherwise returns false.
See also contentType() and setContentType().
new bool QtNetwork.QHttpHeader.HasKey | ( | string | key | ) |
Returns true if the HTTP header has an entry with the given key; otherwise returns false.
See also value(), setValue(), and keys().
new bool QtNetwork.QHttpHeader.IsValid | ( | ) |
Returns true if the HTTP header is valid; otherwise returns false.
A QHttpHeader is invalid if it was created by parsing a malformed string.
new System.Collections.Generic.List<string> QtNetwork.QHttpHeader.Keys | ( | ) |
Returns a list of the keys in the HTTP header.
See also hasKey().
|
pure virtual |
Returns the major protocol-version of the HTTP header.
Implemented in QtNetwork.QHttpResponseHeader, and QtNetwork.QHttpRequestHeader.
|
pure virtual |
Returns the minor protocol-version of the HTTP header.
Implemented in QtNetwork.QHttpResponseHeader, and QtNetwork.QHttpRequestHeader.
|
protected |
|
protectedvirtual |
Reimplemented in QtNetwork.QHttpResponseHeader, and QtNetwork.QHttpRequestHeader.
new void QtNetwork.QHttpHeader.RemoveAllValues | ( | string | key | ) |
Removes all the entries with the key key from the HTTP header.
new void QtNetwork.QHttpHeader.RemoveValue | ( | string | key | ) |
Removes the entry with the key key from the HTTP header.
See also value() and setValue().
new void QtNetwork.QHttpHeader.SetContentLength | ( | int | len | ) |
Sets the value of the special HTTP header field content-length to len.
See also contentLength() and hasContentLength().
|
protected |
new void QtNetwork.QHttpHeader.SetValue | ( | string | key, |
string | value | ||
) |
Sets the value of the entry with the key to value.
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, the first value is discarded and replaced with the given value.
See also value(), hasKey(), and removeValue().
override string QtNetwork.QHttpHeader.ToString | ( | ) |
Returns a string representation of the HTTP header.
The string is suitable for use by the constructor that takes a QString. It consists of lines with the format: key, colon, space, value, "\r\n".
new string QtNetwork.QHttpHeader.Value | ( | string | key | ) |
Returns the first value for the entry with the given key. If no entry has this key, an empty string is returned.
See also setValue(), removeValue(), hasKey(), and keys().
|
protected |
|
getset |
Returns the value of the special HTTP header field content-type.
Sets the value of the special HTTP header field content-type to type.
|
getset |