qTbot 0.89.ee6949a
qTbot is base back end library for your c++ Qt projects.
|
The iRequest class Is main interface for all custom requests. More...
#include <irequest.h>
Public Types | |
enum | RequestMethod { Get , Post , Upload } |
RequestMethod Tgis islist of supported requests types of the requests. More... | |
Public Member Functions | |
iRequest () | |
virtual QString | makeUpload () const |
makeUpload This method prepare data to upload; | |
virtual QString | baseAddress () const =0 |
baseAddress This method return base domain of remote server. | |
virtual RequestMethod | method () const =0 |
method returns method of the request. | |
const QString & | request () const |
request return current requests commnad. | |
void | setRequest (const QString &newRequest) |
setRequest sets custom requests commnad | |
const QMap< QString, QVariant > & | args () const |
args This method returns a current list of arguments | |
void | addArg (const QString &key, const QVariant &val) |
addArg This method push new arg, to arguments list | |
void | setArgs (const QMap< QString, QVariant > &newArgs) |
setArgs For the some requests list of arguments posible to build only after constructor. | |
QString | argsToUrl () const |
argsToUrl This method converts the arguments to a URL string. | |
QSharedPointer< QHttpMultiPart > | argsToMultipartFormData () const |
argsToMultipartFormData This method generates multipart/form-data request data. | |
The iRequest class Is main interface for all custom requests.
Definition at line 32 of file irequest.h.
RequestMethod Tgis islist of supported requests types of the requests.
Enumerator | |
---|---|
Get | general ger request, all request data sent as a url line |
Post | general post request |
Upload | this is post request to upload a big data to telegram |
Definition at line 40 of file irequest.h.
qTbot::iRequest::iRequest | ( | ) |
Definition at line 15 of file irequest.cpp.
void qTbot::iRequest::addArg | ( | const QString & | key, |
const QVariant & | val | ||
) |
addArg This method push new arg, to arguments list
key | This is new argument key |
val | this is new argument value. |
Definition at line 34 of file irequest.cpp.
const QMap< QString, QVariant > & qTbot::iRequest::args | ( | ) | const |
args This method returns a current list of arguments
Definition at line 30 of file irequest.cpp.
QSharedPointer< QHttpMultiPart > qTbot::iRequest::argsToMultipartFormData | ( | ) | const |
argsToMultipartFormData This method generates multipart/form-data request data.
Definition at line 58 of file irequest.cpp.
QString qTbot::iRequest::argsToUrl | ( | ) | const |
argsToUrl This method converts the arguments to a URL string.
Definition at line 42 of file irequest.cpp.
|
pure virtual |
baseAddress This method return base domain of remote server.
Implemented in qTbot::TelegrammDownloadFile, and qTbot::TelegramSingleRquest.
|
virtual |
makeUpload This method prepare data to upload;
Definition at line 20 of file irequest.cpp.
|
pure virtual |
method returns method of the request.
Implemented in qTbot::TelegramSendFile, and qTbot::TelegramSingleRquest.
const QString & qTbot::iRequest::request | ( | ) | const |
request return current requests commnad.
Definition at line 94 of file irequest.cpp.
void qTbot::iRequest::setArgs | ( | const QMap< QString, QVariant > & | newArgs | ) |
setArgs For the some requests list of arguments posible to build only after constructor.
newArgs | This is new list of arguments. |
Definition at line 38 of file irequest.cpp.
void qTbot::iRequest::setRequest | ( | const QString & | newRequest | ) |
setRequest sets custom requests commnad
newRequest | new custom commnad of the request. |
Definition at line 98 of file irequest.cpp.