|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.trolltech.qt.internal.QSignalEmitterInternal
com.trolltech.qt.QSignalEmitter
com.trolltech.qt.QtJambiObject
com.trolltech.qt.network.QNetworkRequest
public class QNetworkRequest
The QNetworkRequest
class holds one request to be sent with the Network Access API. QNetworkRequest
is part of the Network Access API and is the class holding the information necessary to send a request over the network. It contains a URL and some ancillary information that can be used to modify the request.
QNetworkReply
, and QNetworkAccessManager
.
Nested Class Summary | |
---|---|
static class |
QNetworkRequest.Attribute
|
static class |
QNetworkRequest.CacheLoadControl
Controls the caching mechanism of QNetworkAccessManager . |
static class |
QNetworkRequest.KnownHeaders
List of known header types that QNetworkRequest parses. |
Nested classes/interfaces inherited from class com.trolltech.qt.QSignalEmitter |
---|
QSignalEmitter.AbstractSignal, 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 | |
---|---|
QNetworkRequest()
Constructs a QNetworkRequest object with url as the URL to be requested. |
|
QNetworkRequest(QNetworkRequest other)
Creates a copy of other. |
|
QNetworkRequest(QUrl url)
Constructs a QNetworkRequest object with url as the URL to be requested. |
Method Summary | |
---|---|
java.lang.Object |
attribute(QNetworkRequest.Attribute code)
Returns the attribute associated with the code code. |
java.lang.Object |
attribute(QNetworkRequest.Attribute code,
java.lang.Object defaultValue)
Returns the attribute associated with the code code. |
QNetworkRequest |
clone()
This method is reimplemented for internal reasons |
boolean |
hasRawHeader(QByteArray headerName)
Returns true if the raw header headerName is present in this network request. |
java.lang.Object |
header(QNetworkRequest.KnownHeaders header)
Returns the value of the known network header header if it is present in this request. |
QByteArray |
rawHeader(QByteArray headerName)
Returns the raw form of header headerName. |
java.util.List |
rawHeaderList()
Returns a list of all raw headers that are set in this network request. |
void |
setAttribute(QNetworkRequest.Attribute code,
java.lang.Object value)
Sets the attribute associated with code code to be value value. |
void |
setHeader(QNetworkRequest.KnownHeaders header,
java.lang.Object value)
Sets the value of the known header header to be value, overriding any previously set headers. |
void |
setRawHeader(QByteArray headerName,
QByteArray value)
Sets the header headerName to be of value headerValue. |
void |
setUrl(QUrl url)
Sets the URL this network request is referring to to be url. |
QUrl |
url()
Returns the URL this network request is referring to. |
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, toString, wait, wait, wait |
Methods inherited from interface com.trolltech.qt.QtJambiInterface |
---|
disableGarbageCollection, nativeId, nativePointer, reenableGarbageCollection, setJavaOwnership |
Constructor Detail |
---|
public QNetworkRequest(QNetworkRequest other)
public QNetworkRequest()
QNetworkRequest
object with url as the URL to be requested. url()
, and setUrl()
.
public QNetworkRequest(QUrl url)
QNetworkRequest
object with url as the URL to be requested. url()
, and setUrl()
.
Method Detail |
---|
public final java.lang.Object attribute(QNetworkRequest.Attribute code)
Note: this function does not apply the defaults listed in QNetworkRequest::Attribute
.
setAttribute()
, and QNetworkRequest::Attribute
.
public final java.lang.Object attribute(QNetworkRequest.Attribute code, java.lang.Object defaultValue)
Note: this function does not apply the defaults listed in QNetworkRequest::Attribute
.
setAttribute()
, and QNetworkRequest::Attribute
.
public final boolean hasRawHeader(QByteArray headerName)
rawHeader()
, and setRawHeader()
.
public final java.lang.Object header(QNetworkRequest.KnownHeaders header)
KnownHeaders
, rawHeader()
, and setHeader()
.
public final QByteArray rawHeader(QByteArray headerName)
QByteArray
is returned, which may be indistinguishable from a header that is present but has no content (use hasRawHeader()
to find out if the header exists or not). Raw headers can be set with setRawHeader()
or with setHeader()
.
header()
, and setRawHeader()
.
public final java.util.List rawHeaderList()
hasRawHeader()
, and rawHeader()
.
public final void setAttribute(QNetworkRequest.Attribute code, java.lang.Object value)
QVariant
, the attribute is unset. attribute()
, and QNetworkRequest::Attribute
.
public final void setHeader(QNetworkRequest.KnownHeaders header, java.lang.Object value)
KnownHeaders
, setRawHeader()
, and header()
.
public final void setRawHeader(QByteArray headerName, QByteArray value)
QNetworkRequest::KnownHeaders
), the raw format will be parsed and the corresponding "cooked" header will be set as well. For example:
The following code example is written in c++.
request.setRawHeader("Last-Modified", "Sun, 06 Nov 1994 08:49:37 GMT");will also set the known header
LastModifiedHeader
to be the QDateTime
object of the parsed date. Note: setting the same header twice overrides the previous setting. To accomplish the behaviour of multiple HTTP headers of the same name, you should concatenate the two values, separating them with a comma (",") and set one single raw header.
KnownHeaders
, setHeader()
, hasRawHeader()
, and rawHeader()
.
public final void setUrl(QUrl url)
url()
.
public final QUrl url()
setUrl()
.
public QNetworkRequest clone()
clone
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |