QGIS API Documentation  3.21.0-Master (5b68dc587e)
Public Member Functions | List of all members
QgsBufferServerRequest Class Reference

Class defining request with data. More...

#include <qgsbufferserverrequest.h>

Inheritance diagram for QgsBufferServerRequest:
Inheritance graph
[legend]

Public Member Functions

 QgsBufferServerRequest (const QString &url, QgsServerRequest::Method method=QgsServerRequest::GetMethod, const QgsServerRequest::Headers &headers=QgsServerRequest::Headers(), QByteArray *data=nullptr)
 Constructor. More...
 
 QgsBufferServerRequest (const QUrl &url, QgsServerRequest::Method method=QgsServerRequest::GetMethod, const QgsServerRequest::Headers &headers=QgsServerRequest::Headers(), QByteArray *data=nullptr)
 Constructor. More...
 
QByteArray data () const override
 Returns post/put data Check for QByteArray::isNull() to check if data is available. More...
 
- Public Member Functions inherited from QgsServerRequest
 QgsServerRequest ()=default
 Constructor. More...
 
 QgsServerRequest (const QgsServerRequest &other)
 Copy 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...
 
QUrl baseUrl () const
 Returns the base URL of QGIS server. More...
 
virtual QString header (const QString &name) const
 Returns the header value. More...
 
virtual QString header (const RequestHeader &headerEnum) const
 Returns the header value. More...
 
QMap< QString, QString > headers () const
 Returns the header map. More...
 
QgsServerRequest::Method method () const
 
QgsServerRequestoperator= (const QgsServerRequest &)=default
 
QUrl originalUrl () const
 Returns the request url as seen by the web server, by default this is equal to the url seen by QGIS server. More...
 
QString parameter (const QString &key, const QString &defaultValue=QString()) const
 Gets a parameter value. More...
 
QgsServerRequest::Parameters parameters () const
 Returns a map of query parameters with keys converted to uppercase. More...
 
const QString queryParameter (const QString &name, const QString &defaultValue=QString()) const
 Returns the query string parameter with the given name from the request URL, a defaultValue can be specified. More...
 
void removeHeader (const QString &name)
 Remove an header. More...
 
virtual void removeParameter (const QString &key)
 Remove a parameter. More...
 
QgsServerParameters serverParameters () const
 Returns parameters. More...
 
void setHeader (const QString &name, const QString &value)
 Set an header. More...
 
void setMethod (QgsServerRequest::Method method)
 Set the request method. More...
 
virtual void setParameter (const QString &key, const QString &value)
 Set a parameter. More...
 
virtual void setUrl (const QUrl &url)
 Set the request url. More...
 
QUrl url () const
 

Additional Inherited Members

- Public Types inherited from QgsServerRequest
typedef QMap< QString, QString > Headers
 
enum  Method {
  HeadMethod , PutMethod , GetMethod , PostMethod ,
  DeleteMethod , PatchMethod
}
 HTTP Method (or equivalent) used for the request. More...
 
typedef QMap< QString, QString > Parameters
 
enum  RequestHeader {
  HOST , FORWARDED , X_FORWARDED_FOR , X_FORWARDED_HOST ,
  X_FORWARDED_PROTO , X_QGIS_SERVICE_URL , X_QGIS_WMS_SERVICE_URL , X_QGIS_WFS_SERVICE_URL ,
  X_QGIS_WCS_SERVICE_URL , X_QGIS_WMTS_SERVICE_URL
}
 The internal HTTP Header used for the request as enum. More...
 
- Static Public Member Functions inherited from QgsServerRequest
static QString methodToString (const Method &method)
 Returns a string representation of an HTTP request method. More...
 
- Protected Member Functions inherited from QgsServerRequest
void setBaseUrl (const QUrl &url)
 Set the base URL of QGIS server. More...
 
void setOriginalUrl (const QUrl &url)
 Set the request original url (the request url as seen by the web server) More...
 

Detailed Description

Class defining request with data.

Since
QGIS 3.0

Definition at line 31 of file qgsbufferserverrequest.h.

Constructor & Destructor Documentation

◆ QgsBufferServerRequest() [1/2]

QgsBufferServerRequest::QgsBufferServerRequest ( const QString &  url,
QgsServerRequest::Method  method = QgsServerRequest::GetMethod,
const QgsServerRequest::Headers headers = QgsServerRequest::Headers(),
QByteArray *  data = nullptr 
)

Constructor.

Parameters
urlthe url string
methodthe request method, default to GET
headersoptional dictionary of header name-values
dataoptional POST data

Definition at line 22 of file qgsbufferserverrequest.cpp.

◆ QgsBufferServerRequest() [2/2]

QgsBufferServerRequest::QgsBufferServerRequest ( const QUrl &  url,
QgsServerRequest::Method  method = QgsServerRequest::GetMethod,
const QgsServerRequest::Headers headers = QgsServerRequest::Headers(),
QByteArray *  data = nullptr 
)

Constructor.

Parameters
urlQUrl
methodthe request method, default to GET
headersoptional dictionary of header name-values
dataoptional POST data

Definition at line 31 of file qgsbufferserverrequest.cpp.

Member Function Documentation

◆ data()

QByteArray QgsBufferServerRequest::data ( ) const
inlineoverridevirtual

Returns post/put data Check for QByteArray::isNull() to check if data is available.

Reimplemented from QgsServerRequest.

Definition at line 55 of file qgsbufferserverrequest.h.


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