QGIS API Documentation 3.41.0-Master (af5edcb665c)
Loading...
Searching...
No Matches
qgsserverstatichandler.h
Go to the documentation of this file.
1/***************************************************************************
2 qgsserverstatichandler.h - QgsServerStaticHandler
3
4 ---------------------
5 begin : 30.7.2020
6 copyright : (C) 2020 by Alessandro Pasotti
7 email : elpaso at itopen dot it
8 ***************************************************************************
9 * *
10 * This program is free software; you can redistribute it and/or modify *
11 * it under the terms of the GNU General Public License as published by *
12 * the Free Software Foundation; either version 2 of the License, or *
13 * (at your option) any later version. *
14 * *
15 ***************************************************************************/
16#ifndef QGSSERVERSTATICHANDLER_H
17#define QGSSERVERSTATICHANDLER_H
18
20#include "qgis_server.h"
21
29{
30 public:
38 QgsServerStaticHandler( const QString &pathRegExp = QStringLiteral( "/static/(?<staticFilePath>.*)$" ), const QString &staticPathSuffix = QString() );
39
40 void handleRequest( const QgsServerApiContext &context ) const override;
41
42 // QgsServerOgcApiHandler interface
43 QRegularExpression path() const override { return mPathRegExp; }
44 std::string operationId() const override { return "static"; }
45 std::string summary() const override { return "Serves static files"; }
46 std::string description() const override { return "Serves static files"; }
47 std::string linkTitle() const override { return "Serves static files"; }
49
50 private:
51 QRegularExpression mPathRegExp;
52 QString mStaticPathSuffix;
53};
54
55
56#endif // QGSSERVERSTATICHANDLER_H
The QgsServerApiContext class encapsulates the resources for a particular client request: the request...
The QgsServerOgcApiHandler abstract class represents a OGC API handler to be registered in QgsServerO...
virtual void handleRequest(const QgsServerApiContext &context) const
Handles the request within its context.
Rel
Rel link types.
@ data
The target IRI points to resource data.
The QgsServerStaticHandler class serves static files from the static path (resources/server/api/wfs3/...
std::string summary() const override
Summary.
QRegularExpression path() const override
URL pattern for this handler, named capture group are automatically extracted and returned by values(...
std::string description() const override
Description.
std::string operationId() const override
Returns the operation id for template file names and other internal references.
std::string linkTitle() const override
Title for the handler link.
QgsServerOgcApi::Rel linkType() const override
Main role for the resource link.