QGIS API Documentation 3.41.0-Master (cea29feecf2)
Loading...
Searching...
No Matches
Public Member Functions | List of all members
QgsWms::QgsWmsRequest Class Reference

Class defining request interface passed to WMS service. More...

#include <qgswmsrequest.h>

Inheritance diagram for QgsWms::QgsWmsRequest:
Inheritance graph
[legend]

Public Member Functions

 QgsWmsRequest (const QgsServerRequest &other)
 Copy constructor.
 
 ~QgsWmsRequest () override=default
 Destructor.
 
void removeParameter (const QString &key) override
 Remove a parameter.
 
void setParameter (const QString &key, const QString &value) override
 Set a parameter.
 
void setUrl (const QUrl &url) override
 Set the request url.
 
const QgsWmsParameterswmsParameters () const
 Returns the parameters interpreted for the WMS service.
 
- Public Member Functions inherited from QgsServerRequest
 QgsServerRequest ()=default
 
 QgsServerRequest (const QgsServerRequest &other)
 
 QgsServerRequest (const QString &url, QgsServerRequest::Method method=QgsServerRequest::GetMethod, const QgsServerRequest::Headers &headers=QgsServerRequest::Headers())
 Constructor.
 
 QgsServerRequest (const QUrl &url, QgsServerRequest::Method method=QgsServerRequest::GetMethod, const QgsServerRequest::Headers &headers=QgsServerRequest::Headers())
 Constructor.
 
virtual ~QgsServerRequest ()=default
 
QUrl baseUrl () const
 Returns the base URL of QGIS server.
 
virtual QByteArray data () const
 Returns post/put data Check for QByteArray::isNull() to check if data is available.
 
virtual QString header (const QString &name) const
 Returns the header value.
 
virtual QString header (const RequestHeader &headerEnum) const
 Returns the header value.
 
QMap< QString, QString > headers () const
 Returns the header map.
 
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.
 
QString parameter (const QString &key, const QString &defaultValue=QString()) const
 Gets a parameter value.
 
QgsServerRequest::Parameters parameters () const
 Returns a map of query parameters with keys converted to uppercase.
 
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.
 
void removeHeader (const QString &name)
 Remove an header.
 
QgsServerParameters serverParameters () const
 Returns parameters.
 
void setHeader (const QString &name, const QString &value)
 Set an header.
 
void setMethod (QgsServerRequest::Method method)
 Set the request method.
 
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 , ACCEPT , USER_AGENT ,
  AUTHORIZATION
}
 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.
 
- Protected Member Functions inherited from QgsServerRequest
void setBaseUrl (const QUrl &url)
 Set the base URL of QGIS server.
 
void setOriginalUrl (const QUrl &url)
 Set the request original url (the request url as seen by the web server)
 

Detailed Description

Class defining request interface passed to WMS service.

Since
QGIS 3.20

Definition at line 34 of file qgswmsrequest.h.

Constructor & Destructor Documentation

◆ QgsWmsRequest()

QgsWms::QgsWmsRequest::QgsWmsRequest ( const QgsServerRequest other)

Copy constructor.

Definition at line 25 of file qgswmsrequest.cpp.

◆ ~QgsWmsRequest()

QgsWms::QgsWmsRequest::~QgsWmsRequest ( )
overridedefault

Destructor.

Member Function Documentation

◆ removeParameter()

void QgsWms::QgsWmsRequest::removeParameter ( const QString &  key)
overridevirtual

Remove a parameter.

Reimplemented from QgsServerRequest.

Definition at line 42 of file qgswmsrequest.cpp.

◆ setParameter()

void QgsWms::QgsWmsRequest::setParameter ( const QString &  key,
const QString &  value 
)
overridevirtual

Set a parameter.

Reimplemented from QgsServerRequest.

Definition at line 36 of file qgswmsrequest.cpp.

◆ setUrl()

void QgsWms::QgsWmsRequest::setUrl ( const QUrl &  url)
overridevirtual

Set the request url.

Reimplemented from QgsServerRequest.

Definition at line 48 of file qgswmsrequest.cpp.

◆ wmsParameters()

const QgsWmsParameters & QgsWms::QgsWmsRequest::wmsParameters ( ) const

Returns the parameters interpreted for the WMS service.

Definition at line 31 of file qgswmsrequest.cpp.


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