24 mApiRootPath( apiRootPath ),
26 mResponse( response ),
28 mServerInterface( serverInterface )
57 return mServerInterface;
62 QString path { mRequest->
url().path( )};
63 const auto idx { path.indexOf( mApiRootPath )};
66 path.truncate( idx + mApiRootPath.length() );
89 if ( ! urlBasePath.isEmpty() )
91 return url.path().mid( urlBasePath.length() );
Encapsulates a QGIS project, including sets of map layers and their styles, layouts,...
const QgsProject * project() const
Returns the (possibly NULL) project.
QgsServerResponse * response() const
Returns the server response object.
QString handlerPath() const
Returns the handler component of the URL path, i.e.
const QgsServerRequest * request() const
Returns the server request object.
void setProject(const QgsProject *project)
Sets the project to project.
void setRequest(const QgsServerRequest *request)
Sets context request to request.
QgsServerInterface * serverInterface() const
Returns the server interface.
QString apiRootPath() const
Returns the API root path.
QgsServerApiContext(const QString &apiRootPath, const QgsServerRequest *request, QgsServerResponse *response, const QgsProject *project, QgsServerInterface *serverInterface)
QgsServerApiContext constructor.
const QString matchedPath() const
Returns the initial part of the incoming request URL path that matches the API root path.
QgsServerInterface Class defining interfaces exposed by QGIS Server and made available to plugins.
QgsServerRequest Class defining request interface passed to services QgsService::executeRequest() met...
QgsServerResponse Class defining response interface passed to services QgsService::executeRequest() m...