Class: QgsServerStaticHandler

class qgis.server.QgsServerStaticHandler

Bases: qgis._server.QgsServerOgcApiHandler

The QgsServerStaticHandler class serves static files from the static path (resources/server/api/wfs3/static)

New in version 3.16.

QgsServerStaticHandler(pathRegExp: str = ‘’, staticPathSuffix: str = ‘’) Creates QgsServerStaticHandler

Parameters:
  • pathRegExp – optional regular expression to capture static file names, defaults to “/static/(?<staticFilePath>.*)$”, note that the file path is captured in a named group “staticFilePath”

  • staticPathSuffix – optional path suffix to use when static files are stored in a subdirectory of the default staticPath()

QgsServerStaticHandler(QgsServerStaticHandler)

Methods

description

rtype:

object

handleRequest

param context:

linkTitle

rtype:

object

linkType

rtype:

QgsServerOgcApi.Rel

operationId

rtype:

object

path

rtype:

QRegularExpression

setContentTypes

Set the content types to contentTypes

summary

rtype:

object

description(self) object
Return type:

object

handleRequest(self, context: QgsServerApiContext)
Parameters:

context (QgsServerApiContext) –

linkTitle(self) object
Return type:

object

linkType(self) QgsServerOgcApi.Rel
Return type:

QgsServerOgcApi.Rel

operationId(self) object
Return type:

object

path(self) QRegularExpression
Return type:

QRegularExpression

setContentTypes(self, contentTypes: Iterable[int])

Set the content types to contentTypes

summary(self) object
Return type:

object