1// qnetworkrequest.sip generated by MetaSIP 2// 3// This file is part of the QtNetwork Python extension module. 4// 5// Copyright (c) 2021 Riverbank Computing Limited <info@riverbankcomputing.com> 6// 7// This file is part of PyQt5. 8// 9// This file may be used under the terms of the GNU General Public License 10// version 3.0 as published by the Free Software Foundation and appearing in 11// the file LICENSE included in the packaging of this file. Please review the 12// following information to ensure the GNU General Public License version 3.0 13// requirements will be met: http://www.gnu.org/copyleft/gpl.html. 14// 15// If you do not wish to use this file under the terms of the GPL version 3.0 16// then you may purchase a commercial license. For more information contact 17// info@riverbankcomputing.com. 18// 19// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 20// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 21 22 23class QNetworkRequest 24{ 25%TypeHeaderCode 26#include <qnetworkrequest.h> 27%End 28 29public: 30 enum KnownHeaders 31 { 32 ContentTypeHeader, 33 ContentLengthHeader, 34 LocationHeader, 35 LastModifiedHeader, 36 CookieHeader, 37 SetCookieHeader, 38 ContentDispositionHeader, 39 UserAgentHeader, 40 ServerHeader, 41%If (Qt_5_12_0 -) 42 IfModifiedSinceHeader, 43%End 44%If (Qt_5_12_0 -) 45 ETagHeader, 46%End 47%If (Qt_5_12_0 -) 48 IfMatchHeader, 49%End 50%If (Qt_5_12_0 -) 51 IfNoneMatchHeader, 52%End 53 }; 54 55 enum Attribute 56 { 57 HttpStatusCodeAttribute, 58 HttpReasonPhraseAttribute, 59 RedirectionTargetAttribute, 60 ConnectionEncryptedAttribute, 61 CacheLoadControlAttribute, 62 CacheSaveControlAttribute, 63 SourceIsFromCacheAttribute, 64 DoNotBufferUploadDataAttribute, 65 HttpPipeliningAllowedAttribute, 66 HttpPipeliningWasUsedAttribute, 67 CustomVerbAttribute, 68 CookieLoadControlAttribute, 69 AuthenticationReuseAttribute, 70 CookieSaveControlAttribute, 71 BackgroundRequestAttribute, 72%If (Qt_5_3_0 -) 73 SpdyAllowedAttribute, 74%End 75%If (Qt_5_3_0 -) 76 SpdyWasUsedAttribute, 77%End 78%If (Qt_5_5_0 -) 79 EmitAllUploadProgressSignalsAttribute, 80%End 81%If (Qt_5_6_0 -) 82 FollowRedirectsAttribute, 83%End 84%If (Qt_5_8_0 -) 85 HTTP2AllowedAttribute, 86%End 87%If (Qt_5_15_0 -) 88 Http2AllowedAttribute, 89%End 90%If (Qt_5_8_0 -) 91 HTTP2WasUsedAttribute, 92%End 93%If (Qt_5_15_0 -) 94 Http2WasUsedAttribute, 95%End 96%If (Qt_5_9_0 -) 97 OriginalContentLengthAttribute, 98%End 99%If (Qt_5_9_0 -) 100 RedirectPolicyAttribute, 101%End 102%If (Qt_5_11_0 -) 103 Http2DirectAttribute, 104%End 105%If (Qt_5_14_0 -) 106 AutoDeleteReplyOnFinishAttribute, 107%End 108 User, 109 UserMax, 110 }; 111 112 enum CacheLoadControl 113 { 114 AlwaysNetwork, 115 PreferNetwork, 116 PreferCache, 117 AlwaysCache, 118 }; 119 120 enum LoadControl 121 { 122 Automatic, 123 Manual, 124 }; 125 126 enum Priority 127 { 128 HighPriority, 129 NormalPriority, 130 LowPriority, 131 }; 132 133 explicit QNetworkRequest(const QUrl &url = QUrl()); 134 QNetworkRequest(const QNetworkRequest &other); 135 ~QNetworkRequest(); 136 QUrl url() const; 137 void setUrl(const QUrl &url); 138 QVariant header(QNetworkRequest::KnownHeaders header) const; 139 void setHeader(QNetworkRequest::KnownHeaders header, const QVariant &value); 140 bool hasRawHeader(const QByteArray &headerName) const; 141 QList<QByteArray> rawHeaderList() const; 142 QByteArray rawHeader(const QByteArray &headerName) const; 143 void setRawHeader(const QByteArray &headerName, const QByteArray &value); 144 QVariant attribute(QNetworkRequest::Attribute code, const QVariant &defaultValue = QVariant()) const; 145 void setAttribute(QNetworkRequest::Attribute code, const QVariant &value); 146%If (PyQt_SSL) 147 QSslConfiguration sslConfiguration() const; 148%End 149%If (PyQt_SSL) 150 void setSslConfiguration(const QSslConfiguration &configuration); 151%End 152 bool operator==(const QNetworkRequest &other) const; 153 bool operator!=(const QNetworkRequest &other) const; 154 void setOriginatingObject(QObject *object /KeepReference/); 155 QObject *originatingObject() const; 156 QNetworkRequest::Priority priority() const; 157 void setPriority(QNetworkRequest::Priority priority); 158 void swap(QNetworkRequest &other /Constrained/); 159%If (Qt_5_6_0 -) 160 int maximumRedirectsAllowed() const; 161%End 162%If (Qt_5_6_0 -) 163 void setMaximumRedirectsAllowed(int maximumRedirectsAllowed); 164%End 165%If (Qt_5_9_0 -) 166 167 enum RedirectPolicy 168 { 169 ManualRedirectPolicy, 170 NoLessSafeRedirectPolicy, 171 SameOriginRedirectPolicy, 172 UserVerifiedRedirectPolicy, 173 }; 174 175%End 176%If (Qt_5_13_0 -) 177 QString peerVerifyName() const; 178%End 179%If (Qt_5_13_0 -) 180 void setPeerVerifyName(const QString &peerName); 181%End 182%If (Qt_5_14_0 -) 183 QHttp2Configuration http2Configuration() const; 184%End 185%If (Qt_5_14_0 -) 186 void setHttp2Configuration(const QHttp2Configuration &configuration); 187%End 188%If (Qt_5_15_0 -) 189 190 enum TransferTimeoutConstant 191 { 192 DefaultTransferTimeoutConstant, 193 }; 194 195%End 196%If (Qt_5_15_0 -) 197 int transferTimeout() const; 198%End 199%If (Qt_5_15_0 -) 200 void setTransferTimeout(int timeout = QNetworkRequest::TransferTimeoutConstant::DefaultTransferTimeoutConstant); 201%End 202}; 203