libktorrent  2.2.0
Signals | Public Member Functions | List of all members
bt::HTTPRequest Class Reference

#include <httprequest.h>

Inheritance diagram for bt::HTTPRequest:
Inheritance graph
[legend]

Signals

void result (HTTPRequest *r)
 
- Signals inherited from bt::ExitOperation
void operationFinished (ExitOperation *opt)
 

Public Member Functions

 HTTPRequest (const QNetworkRequest &hdr, const QString &payload, const QString &host, bt::Uint16 port, bool verbose)
 
QString errorString () const
 
QByteArray replyData () const
 
void replyFinished (QNetworkReply *networkReply)
 
void start ()
 
bool succeeded () const
 
- Public Member Functions inherited from bt::ExitOperation
virtual bool deleteAllowed () const
 whether or not we can do a deleteLater on the job after it has finished.
 

Detailed Description

Author
Joris Guisson

Simple HTTP request class. TODO: switch to KIO for this

Definition at line 40 of file httprequest.h.

Constructor & Destructor Documentation

◆ HTTPRequest()

bt::HTTPRequest::HTTPRequest ( const QNetworkRequest &  hdr,
const QString &  payload,
const QString &  host,
bt::Uint16  port,
bool  verbose 
)

Constructor, set the url and the request header.

Parameters
hdrThe http request header
payloadThe payload
hostThe host
portTHe port
verbosePrint traffic to the log

Member Function Documentation

◆ errorString()

QString bt::HTTPRequest::errorString ( ) const
inline

In case of failure this function will return an error string

Definition at line 73 of file httprequest.h.

◆ replyData()

QByteArray bt::HTTPRequest::replyData ( ) const
inline

Get the reply data

Definition at line 63 of file httprequest.h.

◆ result

void bt::HTTPRequest::result ( HTTPRequest r)
signal

An OK reply was sent.

Parameters
rThe sender of the request

◆ start()

void bt::HTTPRequest::start ( )

Open a connection and send the request.

◆ succeeded()

bool bt::HTTPRequest::succeeded ( ) const
inline

Did the request succeed

Definition at line 68 of file httprequest.h.


The documentation for this class was generated from the following file: