34 mParams.
load( QUrlQuery( url ) );
39 return mHeaders.value( name );
45 mHeaders.insert( name, value );
56 mHeaders.remove( name );
81 return mParams.
toMap();
96 mParams.
add( key, value );
102 return mParams.
value( key );
108 mUrl.setQuery( mParams.
urlQuery() );
115 mParams.
load( QUrlQuery( mUrl ) );
QgsServerRequest()=default
Constructor.
void setMethod(QgsServerRequest::Method method)
Set the request method.
void setParameter(const QString &key, const QString &value)
Set a parameter.
QMap< QString, QString > toMap() const
Returns all parameters in a map.
QString value(const QString &key) const
Returns the value of a parameter.
void remove(const QString &key)
Removes a parameter.
void load(const QUrlQuery &query)
Loads new parameters.
void setUrl(const QUrl &url)
Set the request url.
Method
HTTP Method (or equivalent) used for the request.
QMap< QString, QString > Headers
QUrl originalUrl() const
Returns the request url as seen by the web server, by default this is equal to the url seen by QGIS s...
QMap< QString, QString > headers() const
Returns the header map.
QString parameter(const QString &key) const
Gets a parameter value.
QgsServerParameters serverParameters() const
Returns parameters.
virtual QByteArray data() const
Returns post/put data Check for QByteArray::isNull() to check if data is available.
QString header(const QString &name) const
Returns the header value.
void setHeader(const QString &name, const QString &value)
Set an header.
QgsServerRequest::Method method() const
QgsServerRequest Class defining request interface passed to services QgsService::executeRequest() met...
void add(const QString &key, const QString &value)
Adds a parameter.
void removeHeader(const QString &name)
Remove an header.
QgsServerParameters provides an interface to retrieve and manipulate global parameters received from ...
QUrlQuery urlQuery() const
Returns a url query with underlying parameters.
void removeParameter(const QString &key)
Remove a parameter.
void setOriginalUrl(const QUrl &url)
Set the request original url (the request url as seen by the web server)
void clear()
Removes all parameters.
QgsServerRequest::Parameters parameters() const
Returns a map of query parameters with keys converted to uppercase.