Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.trolltech.qt.network
Class QHttpRequestHeader

    java.lang.Object
      com.trolltech.qt.QSignalEmitter
          com.trolltech.qt.QtJambiObject
              com.trolltech.qt.network.QHttpHeader
                  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.Signal0, QSignalEmitter.Signal1, QSignalEmitter.Signal2, QSignalEmitter.Signal3, QSignalEmitter.Signal4, QSignalEmitter.Signal5, QSignalEmitter.Signal6, QSignalEmitter.Signal7, QSignalEmitter.Signal8, QSignalEmitter.Signal9`

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
`static QHttpRequestHeader` | `fromNativePointer(QNativePointer nativePointer)` This method returns the QHttpRequestHeader instance pointed to by `nativePointer`.
`java.lang.String` | `method()` Returns the method of the HTTP request header.
`static QNativePointer` | `nativePointerArray(QHttpRequestHeader[] array)` This function returns a QNativePointer that is pointing to the specified QHttpRequestHeader array.
`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 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`

### fromNativePointer

    public static QHttpRequestHeader fromNativePointer(QNativePointer nativePointer)

  This method returns the QHttpRequestHeader instance pointed to by `nativePointer`.

### nativePointerArray

    public static QNativePointer nativePointerArray(QHttpRequestHeader[] array)

  This function returns a QNativePointer that is pointing to the specified QHttpRequestHeader array.

### clone

    public QHttpRequestHeader clone()

  This method is reimplemented for internal reasons

  Overrides:
    `clone` in class `java.lang.Object`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD