QGIS API Documentation
3.2.0-Bonn (bc43194)
|
QgsServerRequest Class defining request interface passed to services QgsService::executeRequest() method. More...
#include <qgsserverrequest.h>
Public Types | |
typedef QMap< QString, QString > | Headers |
enum | Method { HeadMethod, PutMethod, GetMethod, PostMethod, DeleteMethod } |
HTTP Method (or equivalent) used for the request. More... | |
typedef QMap< QString, QString > | Parameters |
Public Member Functions | |
QgsServerRequest ()=default | |
Constructor. More... | |
QgsServerRequest (const QString &url, QgsServerRequest::Method method=QgsServerRequest::GetMethod, const QgsServerRequest::Headers &headers=QgsServerRequest::Headers()) | |
Constructor. More... | |
QgsServerRequest (const QUrl &url, QgsServerRequest::Method method=QgsServerRequest::GetMethod, const QgsServerRequest::Headers &headers=QgsServerRequest::Headers()) | |
Constructor. More... | |
virtual | ~QgsServerRequest ()=default |
destructor More... | |
virtual QByteArray | data () const |
Returns post/put data Check for QByteArray::isNull() to check if data is available. More... | |
QString | header (const QString &name) const |
Returns the header value. More... | |
QMap< QString, QString > | headers () const |
Returns the header map. More... | |
QgsServerRequest::Method | method () const |
QString | parameter (const QString &key) const |
Gets a parameter value. More... | |
QgsServerRequest::Parameters | parameters () const |
Returns a map of query parameters with keys converted to uppercase. More... | |
void | removeHeader (const QString &name) |
Remove an header. More... | |
void | removeParameter (const QString &key) |
Remove a parameter. More... | |
void | setHeader (const QString &name, const QString &value) |
Set an header. More... | |
void | setMethod (QgsServerRequest::Method method) |
Set the request method. More... | |
void | setParameter (const QString &key, const QString &value) |
Set a parameter. More... | |
void | setUrl (const QUrl &url) |
Set the request url. More... | |
QUrl | url () const |
QgsServerRequest Class defining request interface passed to services QgsService::executeRequest() method.
Definition at line 37 of file qgsserverrequest.h.
typedef QMap<QString, QString> QgsServerRequest::Headers |
Definition at line 42 of file qgsserverrequest.h.
typedef QMap<QString, QString> QgsServerRequest::Parameters |
Definition at line 41 of file qgsserverrequest.h.
HTTP Method (or equivalent) used for the request.
Enumerator | |
---|---|
HeadMethod | |
PutMethod | |
GetMethod | |
PostMethod | |
DeleteMethod |
Definition at line 47 of file qgsserverrequest.h.
|
default |
Constructor.
QgsServerRequest::QgsServerRequest | ( | const QString & | url, |
QgsServerRequest::Method | method = QgsServerRequest::GetMethod , |
||
const QgsServerRequest::Headers & | headers = QgsServerRequest::Headers() |
||
) |
Constructor.
url | the url string |
method | the request method |
headers |
QgsServerRequest::QgsServerRequest | ( | const QUrl & | url, |
QgsServerRequest::Method | method = QgsServerRequest::GetMethod , |
||
const QgsServerRequest::Headers & | headers = QgsServerRequest::Headers() |
||
) |
Constructor.
url | QUrl |
method | the request method |
headers |
|
virtualdefault |
destructor
|
virtual |
Returns post/put data Check for QByteArray::isNull() to check if data is available.
QString QgsServerRequest::header | ( | const QString & | name | ) | const |
Returns the header value.
name | of the header |
QMap<QString, QString> QgsServerRequest::headers | ( | ) | const |
Returns the header map.
QgsServerRequest::Method QgsServerRequest::method | ( | ) | const |
QString QgsServerRequest::parameter | ( | const QString & | key | ) | const |
Gets a parameter value.
QgsServerRequest::Parameters QgsServerRequest::parameters | ( | ) | const |
Returns a map of query parameters with keys converted to uppercase.
void QgsServerRequest::removeHeader | ( | const QString & | name | ) |
Remove an header.
name |
void QgsServerRequest::removeParameter | ( | const QString & | key | ) |
Remove a parameter.
void QgsServerRequest::setHeader | ( | const QString & | name, |
const QString & | value | ||
) |
Set an header.
name | |
value |
void QgsServerRequest::setMethod | ( | QgsServerRequest::Method | method | ) |
Set the request method.
void QgsServerRequest::setParameter | ( | const QString & | key, |
const QString & | value | ||
) |
Set a parameter.
void QgsServerRequest::setUrl | ( | const QUrl & | url | ) |
Set the request url.
QUrl QgsServerRequest::url | ( | ) | const |