com.trolltech.qt.network
Class QHttpRequestHeader

java.lang.Object
  extended by com.trolltech.qt.internal.QSignalEmitterInternal
      extended by com.trolltech.qt.QSignalEmitter
          extended by com.trolltech.qt.QtJambiObject
              extended by com.trolltech.qt.network.QHttpHeader
                  extended by com.trolltech.qt.network.QHttpRequestHeader
All Implemented Interfaces:
QtJambiInterface, java.lang.Cloneable

public class QHttpRequestHeader
extends QHttpHeader
implements java.lang.Cloneable

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().

Note that the request-URI must be in the format expected by the HTTP server. That is, all reserved characters must be encoded in %HH (where HH are two hexadecimal digits). See QUrl::toPercentEncoding() for more information.

Important inherited functions: setValue() and value().

See also:
QHttpResponseHeader, and QHttp.


Nested Class Summary
 
Nested classes/interfaces inherited from class com.trolltech.qt.QSignalEmitter
QSignalEmitter.AbstractSignal, QSignalEmitter.PrivateSignal0, QSignalEmitter.PrivateSignal1, QSignalEmitter.PrivateSignal2, QSignalEmitter.PrivateSignal3, QSignalEmitter.PrivateSignal4, QSignalEmitter.PrivateSignal5, QSignalEmitter.PrivateSignal6, QSignalEmitter.PrivateSignal7, QSignalEmitter.PrivateSignal8, QSignalEmitter.PrivateSignal9, QSignalEmitter.Signal0, QSignalEmitter.Signal1, QSignalEmitter.Signal2, QSignalEmitter.Signal3, QSignalEmitter.Signal4, QSignalEmitter.Signal5, QSignalEmitter.Signal6, QSignalEmitter.Signal7, QSignalEmitter.Signal8, QSignalEmitter.Signal9
 
Nested classes/interfaces inherited from class com.trolltech.qt.internal.QSignalEmitterInternal
com.trolltech.qt.internal.QSignalEmitterInternal.AbstractSignalInternal
 
Field Summary
 
Fields inherited from class com.trolltech.qt.internal.QSignalEmitterInternal
currentSender
 
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)
          Constructs a HTTP request header for the method method, the request-URI path and the protocol-version majorVer and minorVer.
QHttpRequestHeader(java.lang.String method, java.lang.String path, int majorVer)
          Constructs a HTTP request header for the method method, the request-URI path and the protocol-version majorVer and minorVer.
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
 QHttpRequestHeader clone()
          This method is reimplemented for internal reasons
 java.lang.String method()
          Returns the method of the HTTP request header.
 java.lang.String path()
          Returns the request-URI of the HTTP request header.
 void setRequest(java.lang.String method, java.lang.String path)
          This function sets the request method to method, the request-URI to path and the protocol-version to majorVer and minorVer.
 void setRequest(java.lang.String method, java.lang.String path, int majorVer)
          This function sets the request method to method, the request-URI to path and the protocol-version to majorVer and minorVer.
 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()
          Returns a string representation of the this QHttpRequestHeader.
 
Methods inherited from class com.trolltech.qt.network.QHttpHeader
addValue, allValues, contentLength, contentType, hasContentLength, hasContentType, hasKey, isValid, keys, majorVersion, minorVersion, removeAllValues, removeValue, setContentLength, setContentType, setValue, setValues, value, values
 
Methods inherited from class com.trolltech.qt.QtJambiObject
dispose, disposed, equals, finalize, reassignNativeResources, tr, tr, tr
 
Methods inherited from class com.trolltech.qt.QSignalEmitter
blockSignals, disconnect, disconnect, signalsBlocked, signalSender, thread
 
Methods inherited from class com.trolltech.qt.internal.QSignalEmitterInternal
__qt_signalInitialization
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.trolltech.qt.QtJambiInterface
disableGarbageCollection, nativeId, nativePointer, reenableGarbageCollection, setJavaOwnership
 

Constructor Detail

QHttpRequestHeader

public QHttpRequestHeader()
Constructs an empty HTTP request header.


QHttpRequestHeader

public QHttpRequestHeader(QHttpRequestHeader header)
Constructs a copy of header.


QHttpRequestHeader

public QHttpRequestHeader(java.lang.String method,
                          java.lang.String path,
                          int majorVer)
Constructs a HTTP request header for the method method, the request-URI path and the protocol-version majorVer and minorVer. The path argument must be properly encoded for an HTTP request.


QHttpRequestHeader

public QHttpRequestHeader(java.lang.String method,
                          java.lang.String path)
Constructs a HTTP request header for the method method, the request-URI path and the protocol-version majorVer and minorVer. The path argument must be properly encoded for an HTTP request.


QHttpRequestHeader

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. The path argument must be properly encoded for an HTTP request.


QHttpRequestHeader

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.

Method Detail

method

public final java.lang.String method()
Returns the method of the HTTP request header.

See also:
path(), majorVersion(), minorVersion(), and setRequest().


path

public final java.lang.String path()
Returns the request-URI of the HTTP request header.

See also:
method(), majorVersion(), minorVersion(), and setRequest().


setRequest

public final void setRequest(java.lang.String method,
                             java.lang.String path,
                             int majorVer)
This function sets the request method to method, the request-URI to path and the protocol-version to majorVer and minorVer. The path argument must be properly encoded for an HTTP request.

See also:
method(), path(), majorVersion(), and minorVersion().


setRequest

public final void setRequest(java.lang.String method,
                             java.lang.String path)
This function sets the request method to method, the request-URI to path and the protocol-version to majorVer and minorVer. The path argument must be properly encoded for an HTTP request.

See also:
method(), path(), majorVersion(), and minorVersion().


setRequest

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. The path argument must be properly encoded for an HTTP request.

See also:
method(), path(), majorVersion(), and minorVersion().


toString

public java.lang.String toString()
Returns a string representation of the this QHttpRequestHeader.

Overrides:
toString in class QHttpHeader

clone

public QHttpRequestHeader clone()
This method is reimplemented for internal reasons

Overrides:
clone in class java.lang.Object