QHttp

#include <QtNetwork/QHttp>

More information will be added here shortly. For now, you'll find more extensive information about this class in the Qt reference for QHttp


Overview

Public Functions Index

QHttp (QObject *parent=0)
QHttp (const QString &hostname, quint16 port=80, QObject *parent=0)
QHttp (const QString &hostname, ConnectionMode mode, quint16 port=0, QObject *parent=0)
virtual ~QHttp ()
qint64bytesAvailable () const
voidclearPendingRequests ()
intclose ()
intcloseConnection ()
QIODevice *currentDestinationDevice () const
intcurrentId () const
QHttpRequestHeadercurrentRequest () const
QIODevice *currentSourceDevice () const
Errorerror () const
QStringerrorString () const
intget (const QString &path, QIODevice *to=0)
boolhasPendingRequests () const
inthead (const QString &path)
QHttpResponseHeaderlastResponse () const
intpost (const QString &path, QIODevice *data, QIODevice *to=0)
intpost (const QString &path, const QByteArray &data, QIODevice *to=0)
qint64read (char *data, qint64 maxlen)
QByteArrayreadAll ()
intrequest (const QHttpRequestHeader &header, QIODevice *device=0, QIODevice *to=0)
intrequest (const QHttpRequestHeader &header, const QByteArray &data, QIODevice *to=0)
intsetHost (const QString &hostname, quint16 port=80)
intsetHost (const QString &hostname, ConnectionMode mode, quint16 port=0)
intsetProxy (const QString &host, int port, const QString &username=QString(), const QString &password=QString())
intsetProxy (const QNetworkProxy &proxy)
intsetSocket (QTcpSocket *socket)
intsetUser (const QString &username, const QString &password=QString())
Statestate () const

Public Slots Index

voidabort ()
voidignoreSslErrors ()

Signals Index

voidauthenticationRequired (const QString &hostname, quint16 port, QAuthenticator *)
voiddataReadProgress (int, int)
voiddataSendProgress (int, int)
voiddone (bool)
voidproxyAuthenticationRequired (const QNetworkProxy &proxy, QAuthenticator *)
voidreadyRead (const QHttpResponseHeader &resp)
voidrequestFinished (int, bool)
voidrequestStarted (int)
voidresponseHeaderReceived (const QHttpResponseHeader &resp)
voidsslErrors (const QList< QSslError > &errors)
voidstateChanged (int)

Public Types

ConnectionMode

ConnectionModeHttp
ConnectionModeHttps

Error

NoError
UnknownError
HostNotFound
ConnectionRefused
UnexpectedClose
InvalidResponseHeader
WrongContentLength
Aborted
AuthenticationRequiredError
ProxyAuthenticationRequiredError

State

Unconnected
HostLookup
Connecting
Sending
Reading
Connected
Closing

Public Functions

QHttp (

QHttp (

QHttp (
  • const QString &hostname,
  • ConnectionModemode,
  • quint16port,
  • QObject *parent )

virtual~QHttp ()

Destructor.

qint64 bytesAvailable ()

void clearPendingRequests ()

int close ()

int closeConnection ()

QIODevice * currentDestinationDevice ()

int currentId ()

QHttpRequestHeader currentRequest ()

QIODevice * currentSourceDevice ()

Error error ()

QString errorString ()

int get (

bool hasPendingRequests ()

int head (

QHttpResponseHeader lastResponse ()

int post (

int post (

qint64 read (
  • char *data,
  • qint64maxlen )

QByteArray readAll ()

int request (

int request (

int setHost (
  • const QString &hostname,
  • quint16port )

int setHost (
  • const QString &hostname,
  • ConnectionModemode,
  • quint16port )

int setProxy (

int setProxy (

int setSocket (

int setUser (

State state ()

Public Slots

void abort ()

void ignoreSslErrors ()

Signals

void authenticationRequired (

void dataReadProgress (
  • int,
  • int )

void dataSendProgress (
  • int,
  • int )

void done (
  • bool)

void proxyAuthenticationRequired (

void readyRead (

void requestFinished (
  • int,
  • bool )

void requestStarted (
  • int)

void responseHeaderReceived (

void sslErrors (

void stateChanged (
  • int)

Last modified: 2015-07-24



Got questions about leaving a comment? Get answers from our Disqus FAQ.

comments powered by Disqus