22 : mError( reply->error() )
23 , mErrorString( reply->errorString() )
24 , mRawHeaderPairs( reply->rawHeaderPairs() )
25 , mRequest( reply->request() )
27 const int maxAttribute =
static_cast< int >( QNetworkRequest::Http2DirectAttribute );
28 for (
int i = 0; i <= maxAttribute; ++i )
30 if ( reply->attribute(
static_cast< QNetworkRequest::Attribute
>( i ) ).isValid() )
31 mAttributes[
static_cast< QNetworkRequest::Attribute
>( i ) ] = reply->attribute(
static_cast< QNetworkRequest::Attribute
>( i ) );
35 const int requestId = reply->property(
"requestId" ).toInt( &ok );
QVariant attribute(QNetworkRequest::Attribute code) const
Returns the attribute associated with the code.
QgsNetworkReplyContent()=default
Default constructor for an empty reply.
bool hasRawHeader(const QByteArray &headerName) const
Returns true if the reply contains a header with the specified headerName.
static QString extractFilenameFromContentDispositionHeader(QNetworkReply *reply)
Extracts the filename component of the content disposition header from a network reply.
QByteArray rawHeader(const QByteArray &headerName) const
Returns the content of the header with the specified headerName, or an empty QByteArray if the specif...
QList< QByteArray > rawHeaderList() const
Returns a list of raw header names contained within the reply.
void clear()
Clears the reply, resetting it back to a default, empty reply.
static QString extractFileNameFromContentDispositionHeader(const QString &header)
Extracts the filename component of the content disposition header from the header.
int requestId() const
Returns the unique ID identifying the original request which this response was formed from.