QHttp Class Reference
[QtNetwork module]
Inherits QObject.
Types
- enum ConnectionMode { ConnectionModeHttp, ConnectionModeHttps }
- enum Error { NoError, UnknownError, HostNotFound, ConnectionRefused, ..., ProxyAuthenticationRequiredError }
- enum State { Unconnected, HostLookup, Connecting, Sending, ..., Closing }
Methods
- __init__ (self, QObject parent = None)
- __init__ (self, QString, int port = 80, QObject parent = None)
- __init__ (self, QString, ConnectionMode, int port = 0, QObject parent = None)
- abort (self)
- int bytesAvailable (self)
- clearPendingRequests (self)
- int close (self)
- QIODevice currentDestinationDevice (self)
- int currentId (self)
- QHttpRequestHeader currentRequest (self)
- QIODevice currentSourceDevice (self)
- Error error (self)
- QString errorString (self)
- int get (self, QString, QIODevice to = None)
- bool hasPendingRequests (self)
- int head (self, QString)
- ignoreSslErrors (self)
- QHttpResponseHeader lastResponse (self)
- int post (self, QString, QIODevice, QIODevice to = None)
- int post (self, QString, QByteArray, QIODevice to = None)
- str read (self, int maxlen)
- QByteArray readAll (self)
- int request (self, QHttpRequestHeader, QIODevice data = None, QIODevice to = None)
- int request (self, QHttpRequestHeader, QByteArray, QIODevice to = None)
- int setHost (self, QString, int port = 80)
- int setHost (self, QString, ConnectionMode, int port = 0)
- int setProxy (self, QString, int, QString user = QString(), QString password = QString())
- int setProxy (self, QNetworkProxy)
- int setSocket (self, QTcpSocket)
- int setUser (self, QString, QString password = QString())
- State state (self)
Qt Signals
Detailed Description
Type Documentation
QHttp.ConnectionMode
QHttp.Error
QHttp.State
Method Documentation
QHttp.__init__ (self, QObject parent = None)
The parent argument, if not None, causes self to be owned by Qt instead of PyQt.
QHttp.__init__ (self, QString, int port = 80, QObject parent = None)
The parent argument, if not None, causes self to be owned by Qt instead of PyQt.
QHttp.__init__ (self, QString, ConnectionMode, int port = 0, QObject parent = None)
The parent argument, if not None, causes self to be owned by Qt instead of PyQt.
QHttp.abort (self)
This method is also a Qt slot with the C++ signature void abort().
int QHttp.bytesAvailable (self)
QHttp.clearPendingRequests (self)
int QHttp.close (self)
QIODevice QHttp.currentDestinationDevice (self)
int QHttp.currentId (self)
QIODevice QHttp.currentSourceDevice (self)
Error QHttp.error (self)
QString QHttp.errorString (self)
int QHttp.get (self, QString, QIODevice to = None)
bool QHttp.hasPendingRequests (self)
int QHttp.head (self, QString)
QHttp.ignoreSslErrors (self)
This method is also a Qt slot with the C++ signature void ignoreSslErrors().
int QHttp.post (self, QString, QIODevice, QIODevice to = None)
int QHttp.post (self, QString, QByteArray, QIODevice to = None)
str QHttp.read (self, int maxlen)
QByteArray QHttp.readAll (self)
int QHttp.setHost (self, QString, int port = 80)
int QHttp.setHost (self, QString, ConnectionMode, int port = 0)
int QHttp.setProxy (self, QString, int, QString user = QString(), QString password = QString())
int QHttp.setProxy (self, QNetworkProxy)
int QHttp.setSocket (self, QTcpSocket)
int QHttp.setUser (self, QString, QString password = QString())
State QHttp.state (self)
Qt Signal Documentation
void authenticationRequired (const QString&,quint16,QAuthenticator *)
This is the default overload of this signal.
void dataReadProgress (int,int)
This is the default overload of this signal.
void dataSendProgress (int,int)
This is the default overload of this signal.
void done (bool)
This is the default overload of this signal.
void proxyAuthenticationRequired (const QNetworkProxy&,QAuthenticator *)
This is the default overload of this signal.
void readyRead (const QHttpResponseHeader&)
This is the default overload of this signal.
void requestFinished (int,bool)
This is the default overload of this signal.
void requestStarted (int)
This is the default overload of this signal.
void responseHeaderReceived (const QHttpResponseHeader&)
This is the default overload of this signal.
void sslErrors (const QList<QSslError>&)
This is the default overload of this signal.
void stateChanged (int)
This is the default overload of this signal.