|
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.trolltech.qt.QSignalEmitter
com.trolltech.qt.QtJambiObject
com.trolltech.qt.network.QHttpHeader
com.trolltech.qt.network.QHttpRequestHeader
public class QHttpRequestHeader
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.
Important inherited functions: setValue and value.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class com.trolltech.qt.QSignalEmitter |
---|
QSignalEmitter.AbstractSignal, QSignalEmitter.Signal0, QSignalEmitter.Signal1<A>, QSignalEmitter.Signal2<A,B>, QSignalEmitter.Signal3<A,B,C>, QSignalEmitter.Signal4<A,B,C,D>, QSignalEmitter.Signal5<A,B,C,D,E>, QSignalEmitter.Signal6<A,B,C,D,E,F>, QSignalEmitter.Signal7<A,B,C,D,E,F,G>, QSignalEmitter.Signal8<A,B,C,D,E,F,G,H>, QSignalEmitter.Signal9<A,B,C,D,E,F,G,H,I> |
Constructor Summary | |
---|---|
QHttpRequestHeader()
Constructs an empty HTTP request header. |
|
QHttpRequestHeader(QHttpRequestHeader header)
Constructs a copy of header. |
|
QHttpRequestHeader(java.lang.String str)
Constructs a HTTP request header from the string str. |
|
QHttpRequestHeader(java.lang.String method,
java.lang.String path)
Equivalent to QHttpRequestHeader(method, path, 1, 1). |
|
QHttpRequestHeader(java.lang.String method,
java.lang.String path,
int majorVer)
Equivalent to QHttpRequestHeader(method, path, majorVer, 1). |
|
QHttpRequestHeader(java.lang.String method,
java.lang.String path,
int majorVer,
int minorVer)
Constructs a HTTP request header for the method method, the request-URI path and the protocol-version majorVer and minorVer. |
Method Summary | |
---|---|
static QHttpRequestHeader |
fromNativePointer(QNativePointer nativePointer)
This function returns the QHttpRequestHeader instance pointed to by nativePointer |
int |
majorVersion()
Returns the major protocol-version of the HTTP request header. |
java.lang.String |
method()
Returns the method of the HTTP request header. |
int |
minorVersion()
Returns the minor protocol-version of the HTTP request header. |
static QNativePointer |
nativePointerArray(QHttpRequestHeader[] array)
This function returns a QNativePointer that is pointing to the specified QHttpRequestHeader array. |
protected boolean |
parseLine(java.lang.String line,
int number)
This function is reimplemented for internal reasons. |
java.lang.String |
path()
Returns the request-URI of the HTTP request header. |
void |
setRequest(java.lang.String method,
java.lang.String path)
Equivalent to setRequest(method, path, 1, 1). |
void |
setRequest(java.lang.String method,
java.lang.String path,
int majorVer)
Equivalent to setRequest(method, path, majorVer, 1). |
void |
setRequest(java.lang.String method,
java.lang.String path,
int majorVer,
int minorVer)
This function sets the request method to method, the request-URI to path and the protocol-version to majorVer and minorVer. |
java.lang.String |
toString()
This function is reimplemented for internal reasons. |
Methods inherited from class com.trolltech.qt.network.QHttpHeader |
---|
addValue, allValues, contentLength, contentType, hasContentLength, hasContentType, hasKey, isValid, keys, parse, removeAllValues, removeValue, setContentLength, setContentType, setValid, setValue, setValues, value, values |
Methods inherited from class com.trolltech.qt.QtJambiObject |
---|
dispose, disposed, finalize, reassignNativeResources, tr, tr, tr |
Methods inherited from class com.trolltech.qt.QSignalEmitter |
---|
blockSignals, disconnect, disconnect, signalsBlocked, signalSender, thread |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface com.trolltech.qt.QtJambiInterface |
---|
disableGarbageCollection, nativeId, nativePointer, reenableGarbageCollection, setJavaOwnership |
Constructor Detail |
---|
public QHttpRequestHeader(java.lang.String 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.
public QHttpRequestHeader(java.lang.String method, java.lang.String path, int majorVer)
Equivalent to QHttpRequestHeader(method, path, majorVer, 1).
public QHttpRequestHeader(java.lang.String method, java.lang.String path)
Equivalent to QHttpRequestHeader(method, path, 1, 1).
public QHttpRequestHeader(java.lang.String method, java.lang.String path, int majorVer, int minorVer)
Constructs a HTTP request header for the method method, the request-URI path and the protocol-version majorVer and minorVer.
public QHttpRequestHeader(QHttpRequestHeader header)
Constructs a copy of header.
public QHttpRequestHeader()
Constructs an empty HTTP request header.
Method Detail |
---|
public final java.lang.String method()
Returns the method of the HTTP request header.
public final java.lang.String path()
Returns the request-URI of the HTTP request header.
public final void setRequest(java.lang.String method, java.lang.String path, int majorVer)
Equivalent to setRequest(method, path, majorVer, 1).
public final void setRequest(java.lang.String method, java.lang.String path)
Equivalent to setRequest(method, path, 1, 1).
public final void setRequest(java.lang.String method, java.lang.String path, int majorVer, int minorVer)
This function sets the request method to method, the request-URI to path and the protocol-version to majorVer and minorVer.
public int majorVersion()
Returns the major protocol-version of the HTTP request header.
majorVersion
in class QHttpHeader
public int minorVersion()
Returns the minor protocol-version of the HTTP request header.
minorVersion
in class QHttpHeader
protected boolean parseLine(java.lang.String line, int number)
This function is reimplemented for internal reasons.
parseLine
in class QHttpHeader
public java.lang.String toString()
This function is reimplemented for internal reasons.
toString
in class QHttpHeader
public static QHttpRequestHeader fromNativePointer(QNativePointer nativePointer)
nativePointer
- the QNativePointer of which object should be returned.public static QNativePointer nativePointerArray(QHttpRequestHeader[] array)
array
- the array that the returned pointer will point to.
|
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |