API reference - Class QNetworkRequest

Notation used in Ruby API documentation

Description: Binding of QNetworkRequest

Sub-classes: Attribute, KnownHeaders

Public constructors

new QNetworkRequestnew(const QUrl url = QUrl())Constructor QNetworkRequest::QNetworkRequest(const QUrl &url)
new QNetworkRequestnew(const QNetworkRequest other)Constructor QNetworkRequest::QNetworkRequest(const QNetworkRequest &other)

Public methods

[const]bool!=(const QNetworkRequest other)Method bool QNetworkRequest::operator!=(const QNetworkRequest &other)
[const]bool==(const QNetworkRequest other)Method bool QNetworkRequest::operator==(const QNetworkRequest &other)
void_assign(const QNetworkRequest other)Assigns another object to self
void_createEnsures the C++ object is created
void_destroyExplicitly destroys the object
[const]bool_destroyed?Returns a value indicating whether the object was already destroyed
[const]bool_is_const_object?Returns a value indicating whether the reference is a const reference
void_manageMarks the object as managed by the script side.
void_unmanageMarks the object as no longer owned by the script side.
QNetworkRequestassign(const QNetworkRequest other)Method QNetworkRequest &QNetworkRequest::operator=(const QNetworkRequest &other)
[const]QVariantattribute(const QNetworkRequest_Attribute code,
const QVariant defaultValue = QVariant())
Method QVariant QNetworkRequest::attribute(QNetworkRequest::Attribute code, const QVariant &defaultValue)
[const]new QNetworkRequest ptrdupCreates a copy of self
[const]boolhasRawHeader(string headerName)Method bool QNetworkRequest::hasRawHeader(const QByteArray &headerName)
[const]QVariantheader(const QNetworkRequest_KnownHeaders header)Method QVariant QNetworkRequest::header(QNetworkRequest::KnownHeaders header)
[const]QObject ptroriginatingObjectMethod QObject *QNetworkRequest::originatingObject()
voidoriginatingObject=(QObject ptr object)Method void QNetworkRequest::setOriginatingObject(QObject *object)
[const]stringrawHeader(string headerName)Method QByteArray QNetworkRequest::rawHeader(const QByteArray &headerName)
[const]string[]rawHeaderListMethod QList<QByteArray> QNetworkRequest::rawHeaderList()
voidsetAttribute(const QNetworkRequest_Attribute code,
const QVariant value)
Method void QNetworkRequest::setAttribute(QNetworkRequest::Attribute code, const QVariant &value)
voidsetHeader(const QNetworkRequest_KnownHeaders header,
const QVariant value)
Method void QNetworkRequest::setHeader(QNetworkRequest::KnownHeaders header, const QVariant &value)
voidsetOriginatingObject(QObject ptr object)Method void QNetworkRequest::setOriginatingObject(QObject *object)
voidsetRawHeader(string headerName,
string value)
Method void QNetworkRequest::setRawHeader(const QByteArray &headerName, const QByteArray &value)
voidsetSslConfiguration(const QSslConfiguration configuration)Method void QNetworkRequest::setSslConfiguration(const QSslConfiguration &configuration)
voidsetUrl(const QUrl url)Method void QNetworkRequest::setUrl(const QUrl &url)
[const]QSslConfigurationsslConfigurationMethod QSslConfiguration QNetworkRequest::sslConfiguration()
voidsslConfiguration=(const QSslConfiguration configuration)Method void QNetworkRequest::setSslConfiguration(const QSslConfiguration &configuration)
[const]QUrlurlMethod QUrl QNetworkRequest::url()
voidurl=(const QUrl url)Method void QNetworkRequest::setUrl(const QUrl &url)

Public static methods and constants

[static,const]new QNetworkRequest_Attribute ptrCacheLoadControlAttributeEnum constant QNetworkRequest::CacheLoadControlAttribute
[static,const]new QNetworkRequest_Attribute ptrCacheSaveControlAttributeEnum constant QNetworkRequest::CacheSaveControlAttribute
[static,const]new QNetworkRequest_Attribute ptrConnectionEncryptedAttributeEnum constant QNetworkRequest::ConnectionEncryptedAttribute
[static,const]new QNetworkRequest_KnownHeaders ptrContentLengthHeaderEnum constant QNetworkRequest::ContentLengthHeader
[static,const]new QNetworkRequest_KnownHeaders ptrContentTypeHeaderEnum constant QNetworkRequest::ContentTypeHeader
[static,const]new QNetworkRequest_KnownHeaders ptrCookieHeaderEnum constant QNetworkRequest::CookieHeader
[static,const]new QNetworkRequest_Attribute ptrDoNotBufferUploadDataAttributeEnum constant QNetworkRequest::DoNotBufferUploadDataAttribute
[static,const]new QNetworkRequest_Attribute ptrHttpPipeliningAllowedAttributeEnum constant QNetworkRequest::HttpPipeliningAllowedAttribute
[static,const]new QNetworkRequest_Attribute ptrHttpPipeliningWasUsedAttributeEnum constant QNetworkRequest::HttpPipeliningWasUsedAttribute
[static,const]new QNetworkRequest_Attribute ptrHttpReasonPhraseAttributeEnum constant QNetworkRequest::HttpReasonPhraseAttribute
[static,const]new QNetworkRequest_Attribute ptrHttpStatusCodeAttributeEnum constant QNetworkRequest::HttpStatusCodeAttribute
[static,const]new QNetworkRequest_KnownHeaders ptrLastModifiedHeaderEnum constant QNetworkRequest::LastModifiedHeader
[static,const]new QNetworkRequest_KnownHeaders ptrLocationHeaderEnum constant QNetworkRequest::LocationHeader
[static,const]new QNetworkRequest_Attribute ptrRedirectionTargetAttributeEnum constant QNetworkRequest::RedirectionTargetAttribute
[static,const]new QNetworkRequest_KnownHeaders ptrSetCookieHeaderEnum constant QNetworkRequest::SetCookieHeader
[static,const]new QNetworkRequest_Attribute ptrSourceIsFromCacheAttributeEnum constant QNetworkRequest::SourceIsFromCacheAttribute
[static,const]new QNetworkRequest_Attribute ptrUserEnum constant QNetworkRequest::User
[static,const]new QNetworkRequest_Attribute ptrUserMaxEnum constant QNetworkRequest::UserMax

Deprecated methods (protected, public, static, non-static and constructors)

voidcreateUse of this method is deprecated. Use _create instead
voiddestroyUse of this method is deprecated. Use _destroy instead
[const]booldestroyed?Use of this method is deprecated. Use _destroyed? instead
[const]boolis_const_object?Use of this method is deprecated. Use _is_const_object? instead

Detailed description

[const] bool !=(const QNetworkRequest other)

Description: Method bool QNetworkRequest::operator!=(const QNetworkRequest &other)

[const] bool ==(const QNetworkRequest other)

Description: Method bool QNetworkRequest::operator==(const QNetworkRequest &other)

[static,const] new QNetworkRequest_Attribute ptr CacheLoadControlAttribute

Description: Enum constant QNetworkRequest::CacheLoadControlAttribute

[static,const] new QNetworkRequest_Attribute ptr CacheSaveControlAttribute

Description: Enum constant QNetworkRequest::CacheSaveControlAttribute

[static,const] new QNetworkRequest_Attribute ptr ConnectionEncryptedAttribute

Description: Enum constant QNetworkRequest::ConnectionEncryptedAttribute

[static,const] new QNetworkRequest_KnownHeaders ptr ContentLengthHeader

Description: Enum constant QNetworkRequest::ContentLengthHeader

[static,const] new QNetworkRequest_KnownHeaders ptr ContentTypeHeader

Description: Enum constant QNetworkRequest::ContentTypeHeader

[static,const] new QNetworkRequest_KnownHeaders ptr CookieHeader

Description: Enum constant QNetworkRequest::CookieHeader

[static,const] new QNetworkRequest_Attribute ptr DoNotBufferUploadDataAttribute

Description: Enum constant QNetworkRequest::DoNotBufferUploadDataAttribute

[static,const] new QNetworkRequest_Attribute ptr HttpPipeliningAllowedAttribute

Description: Enum constant QNetworkRequest::HttpPipeliningAllowedAttribute

[static,const] new QNetworkRequest_Attribute ptr HttpPipeliningWasUsedAttribute

Description: Enum constant QNetworkRequest::HttpPipeliningWasUsedAttribute

[static,const] new QNetworkRequest_Attribute ptr HttpReasonPhraseAttribute

Description: Enum constant QNetworkRequest::HttpReasonPhraseAttribute

[static,const] new QNetworkRequest_Attribute ptr HttpStatusCodeAttribute

Description: Enum constant QNetworkRequest::HttpStatusCodeAttribute

[static,const] new QNetworkRequest_KnownHeaders ptr LastModifiedHeader

Description: Enum constant QNetworkRequest::LastModifiedHeader

[static,const] new QNetworkRequest_KnownHeaders ptr LocationHeader

Description: Enum constant QNetworkRequest::LocationHeader

[static,const] new QNetworkRequest_Attribute ptr RedirectionTargetAttribute

Description: Enum constant QNetworkRequest::RedirectionTargetAttribute

[static,const] new QNetworkRequest_KnownHeaders ptr SetCookieHeader

Description: Enum constant QNetworkRequest::SetCookieHeader

[static,const] new QNetworkRequest_Attribute ptr SourceIsFromCacheAttribute

Description: Enum constant QNetworkRequest::SourceIsFromCacheAttribute

[static,const] new QNetworkRequest_Attribute ptr User

Description: Enum constant QNetworkRequest::User

[static,const] new QNetworkRequest_Attribute ptr UserMax

Description: Enum constant QNetworkRequest::UserMax

void _assign(const QNetworkRequest other)

Description: Assigns another object to self

void _create

Description: Ensures the C++ object is created

Use this method to ensure the C++ object is created, for example to ensure that resources are allocated. Usually C++ objects are created on demand and not necessarily when the script object is created.

void _destroy

Description: Explicitly destroys the object

Explicitly destroys the object on C++ side if it was owned by the script interpreter. Subsequent access to this object will throw an exception. If the object is not owned by the script, this method will do nothing.

[const] bool _destroyed?

Description: Returns a value indicating whether the object was already destroyed

This method returns true, if the object was destroyed, either explicitly or by the C++ side. The latter may happen, if the object is owned by a C++ object which got destroyed itself.

[const] bool _is_const_object?

Description: Returns a value indicating whether the reference is a const reference

This method returns true, if self is a const reference. In that case, only const methods may be called on self.

void _manage

Description: Marks the object as managed by the script side.

After calling this method on an object, the script side will be responsible for the management of the object. This method may be called if an object is returned from a C++ function and the object is known not to be owned by any C++ instance. If necessary, the script side may delete the object if the script's reference is no longer required.

Usually it's not required to call this method. It has been introduced in version 0.24.

void _unmanage

Description: Marks the object as no longer owned by the script side.

Calling this method will make this object no longer owned by the script's memory management. Instead, the object must be managed in some other way. Usually this method may be called if it is known that some C++ object holds and manages this object. Technically speaking, this method will turn the script's reference into a weak reference. After the script engine decides to delete the reference, the object itself will still exist. If the object is not managed otherwise, memory leaks will occur.

Usually it's not required to call this method. It has been introduced in version 0.24.

QNetworkRequest assign(const QNetworkRequest other)

Description: Method QNetworkRequest &QNetworkRequest::operator=(const QNetworkRequest &other)

[const] QVariant attribute(const QNetworkRequest_Attribute code,const QVariant defaultValue = QVariant())

Description: Method QVariant QNetworkRequest::attribute(QNetworkRequest::Attribute code, const QVariant &defaultValue)

void create

Description: Ensures the C++ object is created

Use of this method is deprecated. Use _create instead

void destroy

Description: Explicitly destroys the object

Use of this method is deprecated. Use _destroy instead

[const] bool destroyed?

Description: Returns a value indicating whether the object was already destroyed

Use of this method is deprecated. Use _destroyed? instead

[const] new QNetworkRequest ptr dup

Description: Creates a copy of self

[const] bool hasRawHeader(string headerName)

Description: Method bool QNetworkRequest::hasRawHeader(const QByteArray &headerName)

[const] QVariant header(const QNetworkRequest_KnownHeaders header)

Description: Method QVariant QNetworkRequest::header(QNetworkRequest::KnownHeaders header)

[const] bool is_const_object?

Description: Returns a value indicating whether the reference is a const reference

Use of this method is deprecated. Use _is_const_object? instead

[static] new QNetworkRequest new(const QUrl url = QUrl())

Description: Constructor QNetworkRequest::QNetworkRequest(const QUrl &url)

This method creates an object of class QNetworkRequest.

Python specific notes:

This method is the default initializer of the object

[static] new QNetworkRequest new(const QNetworkRequest other)

Description: Constructor QNetworkRequest::QNetworkRequest(const QNetworkRequest &other)

This method creates an object of class QNetworkRequest.

Python specific notes:

This method is the default initializer of the object

[const] QObject ptr originatingObject

Description: Method QObject *QNetworkRequest::originatingObject()

Python specific notes:

The object exposes a readable attribute 'originatingObject'. This is the getter.

void originatingObject=(QObject ptr object)

Description: Method void QNetworkRequest::setOriginatingObject(QObject *object)

Python specific notes:

The object exposes a writable attribute 'originatingObject'. This is the setter.

[const] string rawHeader(string headerName)

Description: Method QByteArray QNetworkRequest::rawHeader(const QByteArray &headerName)

[const] string[] rawHeaderList

Description: Method QList<QByteArray> QNetworkRequest::rawHeaderList()

void setAttribute(const QNetworkRequest_Attribute code,const QVariant value)

Description: Method void QNetworkRequest::setAttribute(QNetworkRequest::Attribute code, const QVariant &value)

void setHeader(const QNetworkRequest_KnownHeaders header,const QVariant value)

Description: Method void QNetworkRequest::setHeader(QNetworkRequest::KnownHeaders header, const QVariant &value)

void setOriginatingObject(QObject ptr object)

Description: Method void QNetworkRequest::setOriginatingObject(QObject *object)

Python specific notes:

The object exposes a writable attribute 'originatingObject'. This is the setter.

void setRawHeader(string headerName,string value)

Description: Method void QNetworkRequest::setRawHeader(const QByteArray &headerName, const QByteArray &value)

void setSslConfiguration(const QSslConfiguration configuration)

Description: Method void QNetworkRequest::setSslConfiguration(const QSslConfiguration &configuration)

Python specific notes:

The object exposes a writable attribute 'sslConfiguration'. This is the setter.

void setUrl(const QUrl url)

Description: Method void QNetworkRequest::setUrl(const QUrl &url)

Python specific notes:

The object exposes a writable attribute 'url'. This is the setter.

[const] QSslConfiguration sslConfiguration

Description: Method QSslConfiguration QNetworkRequest::sslConfiguration()

Python specific notes:

The object exposes a readable attribute 'sslConfiguration'. This is the getter.

void sslConfiguration=(const QSslConfiguration configuration)

Description: Method void QNetworkRequest::setSslConfiguration(const QSslConfiguration &configuration)

Python specific notes:

The object exposes a writable attribute 'sslConfiguration'. This is the setter.

[const] QUrl url

Description: Method QUrl QNetworkRequest::url()

Python specific notes:

The object exposes a readable attribute 'url'. This is the getter.

void url=(const QUrl url)

Description: Method void QNetworkRequest::setUrl(const QUrl &url)

Python specific notes:

The object exposes a writable attribute 'url'. This is the setter.