KLayout 0.29.8 (2024-11-26 926dac96c) [master]

API reference - Class QNetworkRequest

Notation used in Ruby API documentation

Module: QtNetwork

Description: Binding of QNetworkRequest

Sub-classes: Attribute, QFlags_Attribute, KnownHeaders, QFlags_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
[const]QNetworkRequest ptr_const_castReturns a non-const reference 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]variantattribute(const QNetworkRequest_Attribute code,
variant defaultValue = QVariant())
Method QVariant QNetworkRequest::attribute(QNetworkRequest::Attribute code, const QVariant &defaultValue)
[const]new QNetworkRequest ptrdupCreates a copy of self
[const]boolhasRawHeader(bytes headerName)Method bool QNetworkRequest::hasRawHeader(const QByteArray &headerName)
[const]variantheader(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]bytesrawHeader(bytes headerName)Method QByteArray QNetworkRequest::rawHeader(const QByteArray &headerName)
[const]bytes[]rawHeaderListMethod QList<QByteArray> QNetworkRequest::rawHeaderList()
voidsetAttribute(const QNetworkRequest_Attribute code,
variant value)
Method void QNetworkRequest::setAttribute(QNetworkRequest::Attribute code, const QVariant &value)
voidsetHeader(const QNetworkRequest_KnownHeaders header,
variant value)
Method void QNetworkRequest::setHeader(QNetworkRequest::KnownHeaders header, const QVariant &value)
voidsetOriginatingObject(QObject ptr object)Method void QNetworkRequest::setOriginatingObject(QObject *object)
voidsetRawHeader(bytes headerName,
bytes 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]QNetworkRequest_AttributeCacheLoadControlAttributeEnum constant QNetworkRequest::CacheLoadControlAttribute
[static,const]QNetworkRequest_AttributeCacheSaveControlAttributeEnum constant QNetworkRequest::CacheSaveControlAttribute
[static,const]QNetworkRequest_AttributeConnectionEncryptedAttributeEnum constant QNetworkRequest::ConnectionEncryptedAttribute
[static,const]QNetworkRequest_KnownHeadersContentLengthHeaderEnum constant QNetworkRequest::ContentLengthHeader
[static,const]QNetworkRequest_KnownHeadersContentTypeHeaderEnum constant QNetworkRequest::ContentTypeHeader
[static,const]QNetworkRequest_KnownHeadersCookieHeaderEnum constant QNetworkRequest::CookieHeader
[static,const]QNetworkRequest_AttributeDoNotBufferUploadDataAttributeEnum constant QNetworkRequest::DoNotBufferUploadDataAttribute
[static,const]QNetworkRequest_AttributeHttpPipeliningAllowedAttributeEnum constant QNetworkRequest::HttpPipeliningAllowedAttribute
[static,const]QNetworkRequest_AttributeHttpPipeliningWasUsedAttributeEnum constant QNetworkRequest::HttpPipeliningWasUsedAttribute
[static,const]QNetworkRequest_AttributeHttpReasonPhraseAttributeEnum constant QNetworkRequest::HttpReasonPhraseAttribute
[static,const]QNetworkRequest_AttributeHttpStatusCodeAttributeEnum constant QNetworkRequest::HttpStatusCodeAttribute
[static,const]QNetworkRequest_KnownHeadersLastModifiedHeaderEnum constant QNetworkRequest::LastModifiedHeader
[static,const]QNetworkRequest_KnownHeadersLocationHeaderEnum constant QNetworkRequest::LocationHeader
[static,const]QNetworkRequest_AttributeRedirectionTargetAttributeEnum constant QNetworkRequest::RedirectionTargetAttribute
[static,const]QNetworkRequest_KnownHeadersSetCookieHeaderEnum constant QNetworkRequest::SetCookieHeader
[static,const]QNetworkRequest_AttributeSourceIsFromCacheAttributeEnum constant QNetworkRequest::SourceIsFromCacheAttribute
[static,const]QNetworkRequest_AttributeUserEnum constant QNetworkRequest::User
[static,const]QNetworkRequest_AttributeUserMaxEnum 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

!=

Signature: [const] bool != (const QNetworkRequest other)

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

==

Signature: [const] bool == (const QNetworkRequest other)

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

CacheLoadControlAttribute

Signature: [static,const] QNetworkRequest_Attribute CacheLoadControlAttribute

Description: Enum constant QNetworkRequest::CacheLoadControlAttribute

Python specific notes:
The object exposes a readable attribute 'CacheLoadControlAttribute'. This is the getter.

CacheSaveControlAttribute

Signature: [static,const] QNetworkRequest_Attribute CacheSaveControlAttribute

Description: Enum constant QNetworkRequest::CacheSaveControlAttribute

Python specific notes:
The object exposes a readable attribute 'CacheSaveControlAttribute'. This is the getter.

ConnectionEncryptedAttribute

Signature: [static,const] QNetworkRequest_Attribute ConnectionEncryptedAttribute

Description: Enum constant QNetworkRequest::ConnectionEncryptedAttribute

Python specific notes:
The object exposes a readable attribute 'ConnectionEncryptedAttribute'. This is the getter.

ContentLengthHeader

Signature: [static,const] QNetworkRequest_KnownHeaders ContentLengthHeader

Description: Enum constant QNetworkRequest::ContentLengthHeader

Python specific notes:
The object exposes a readable attribute 'ContentLengthHeader'. This is the getter.

ContentTypeHeader

Signature: [static,const] QNetworkRequest_KnownHeaders ContentTypeHeader

Description: Enum constant QNetworkRequest::ContentTypeHeader

Python specific notes:
The object exposes a readable attribute 'ContentTypeHeader'. This is the getter.

CookieHeader

Signature: [static,const] QNetworkRequest_KnownHeaders CookieHeader

Description: Enum constant QNetworkRequest::CookieHeader

Python specific notes:
The object exposes a readable attribute 'CookieHeader'. This is the getter.

DoNotBufferUploadDataAttribute

Signature: [static,const] QNetworkRequest_Attribute DoNotBufferUploadDataAttribute

Description: Enum constant QNetworkRequest::DoNotBufferUploadDataAttribute

Python specific notes:
The object exposes a readable attribute 'DoNotBufferUploadDataAttribute'. This is the getter.

HttpPipeliningAllowedAttribute

Signature: [static,const] QNetworkRequest_Attribute HttpPipeliningAllowedAttribute

Description: Enum constant QNetworkRequest::HttpPipeliningAllowedAttribute

Python specific notes:
The object exposes a readable attribute 'HttpPipeliningAllowedAttribute'. This is the getter.

HttpPipeliningWasUsedAttribute

Signature: [static,const] QNetworkRequest_Attribute HttpPipeliningWasUsedAttribute

Description: Enum constant QNetworkRequest::HttpPipeliningWasUsedAttribute

Python specific notes:
The object exposes a readable attribute 'HttpPipeliningWasUsedAttribute'. This is the getter.

HttpReasonPhraseAttribute

Signature: [static,const] QNetworkRequest_Attribute HttpReasonPhraseAttribute

Description: Enum constant QNetworkRequest::HttpReasonPhraseAttribute

Python specific notes:
The object exposes a readable attribute 'HttpReasonPhraseAttribute'. This is the getter.

HttpStatusCodeAttribute

Signature: [static,const] QNetworkRequest_Attribute HttpStatusCodeAttribute

Description: Enum constant QNetworkRequest::HttpStatusCodeAttribute

Python specific notes:
The object exposes a readable attribute 'HttpStatusCodeAttribute'. This is the getter.

LastModifiedHeader

Signature: [static,const] QNetworkRequest_KnownHeaders LastModifiedHeader

Description: Enum constant QNetworkRequest::LastModifiedHeader

Python specific notes:
The object exposes a readable attribute 'LastModifiedHeader'. This is the getter.

LocationHeader

Signature: [static,const] QNetworkRequest_KnownHeaders LocationHeader

Description: Enum constant QNetworkRequest::LocationHeader

Python specific notes:
The object exposes a readable attribute 'LocationHeader'. This is the getter.

RedirectionTargetAttribute

Signature: [static,const] QNetworkRequest_Attribute RedirectionTargetAttribute

Description: Enum constant QNetworkRequest::RedirectionTargetAttribute

Python specific notes:
The object exposes a readable attribute 'RedirectionTargetAttribute'. This is the getter.

SetCookieHeader

Signature: [static,const] QNetworkRequest_KnownHeaders SetCookieHeader

Description: Enum constant QNetworkRequest::SetCookieHeader

Python specific notes:
The object exposes a readable attribute 'SetCookieHeader'. This is the getter.

SourceIsFromCacheAttribute

Signature: [static,const] QNetworkRequest_Attribute SourceIsFromCacheAttribute

Description: Enum constant QNetworkRequest::SourceIsFromCacheAttribute

Python specific notes:
The object exposes a readable attribute 'SourceIsFromCacheAttribute'. This is the getter.

User

Signature: [static,const] QNetworkRequest_Attribute User

Description: Enum constant QNetworkRequest::User

Python specific notes:
The object exposes a readable attribute 'User'. This is the getter.

UserMax

Signature: [static,const] QNetworkRequest_Attribute UserMax

Description: Enum constant QNetworkRequest::UserMax

Python specific notes:
The object exposes a readable attribute 'UserMax'. This is the getter.

_assign

Signature: void _assign (const QNetworkRequest other)

Description: Assigns another object to self

_const_cast

Signature: [const] QNetworkRequest ptr _const_cast

Description: Returns a non-const reference to self.

Basically, this method allows turning a const object reference to a non-const one. This method is provided as last resort to remove the constness from an object. Usually there is a good reason for a const object reference, so using this method may have undesired side effects.

This method has been introduced in version 0.29.6.

_create

Signature: 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.

_destroy

Signature: 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.

_destroyed?

Signature: [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.

_is_const_object?

Signature: [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.

_manage

Signature: 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.

_unmanage

Signature: 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.

assign

Signature: QNetworkRequest assign (const QNetworkRequest other)

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

attribute

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

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

create

Signature: void create

Description: Ensures the C++ object is created

Use of this method is deprecated. Use _create instead

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.

destroy

Signature: void destroy

Description: Explicitly destroys the object

Use of this method is deprecated. Use _destroy instead

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.

destroyed?

Signature: [const] bool destroyed?

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

Use of this method is deprecated. Use _destroyed? instead

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.

dup

Signature: [const] new QNetworkRequest ptr dup

Description: Creates a copy of self

Python specific notes:
This method also implements '__copy__' and '__deepcopy__'.

hasRawHeader

Signature: [const] bool hasRawHeader (bytes headerName)

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

header

Signature: [const] variant header (const QNetworkRequest_KnownHeaders header)

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

is_const_object?

Signature: [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

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

new

(1) Signature: [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.

(2) Signature: [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.

originatingObject

Signature: [const] QObject ptr originatingObject

Description: Method QObject *QNetworkRequest::originatingObject()

Python specific notes:
The object exposes a readable attribute 'originatingObject'. This is the getter.

originatingObject=

Signature: 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.

rawHeader

Signature: [const] bytes rawHeader (bytes headerName)

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

rawHeaderList

Signature: [const] bytes[] rawHeaderList

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

setAttribute

Signature: void setAttribute (const QNetworkRequest_Attribute code, variant value)

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

setHeader

Signature: void setHeader (const QNetworkRequest_KnownHeaders header, variant value)

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

setOriginatingObject

Signature: 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.

setRawHeader

Signature: void setRawHeader (bytes headerName, bytes value)

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

setSslConfiguration

Signature: 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.

setUrl

Signature: 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.

sslConfiguration

Signature: [const] QSslConfiguration sslConfiguration

Description: Method QSslConfiguration QNetworkRequest::sslConfiguration()

Python specific notes:
The object exposes a readable attribute 'sslConfiguration'. This is the getter.

sslConfiguration=

Signature: 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.

url

Signature: [const] QUrl url

Description: Method QUrl QNetworkRequest::url()

Python specific notes:
The object exposes a readable attribute 'url'. This is the getter.

url=

Signature: 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.