Skip to content

RequestHandlerDelegate.contentTypes and RequestHandler.links#4

Open
rldhont wants to merge 2 commits into3liz:masterfrom
rldhont:request-handler-links
Open

RequestHandlerDelegate.contentTypes and RequestHandler.links#4
rldhont wants to merge 2 commits into3liz:masterfrom
rldhont:request-handler-links

Conversation

@rldhont
Copy link
Copy Markdown
Contributor

@rldhont rldhont commented Sep 3, 2021

To provide self and alternate links the RequestHandlerDelegate.contentTypes and RequestHandler.links have been implemented because QgsServerOgcApiHandler::contentTypes and QgsServerOgcApiHandler::links are not available in Python bindings.

QgsServerOgcApiHandler::contentTypes not available in Python bindings

Add RequestHandlerDelegate.contentTypes to return the list of content types this handler can serve, default to JSON and HTML.
QgsServerOgcApiHandler::links not available in Python bindings

Add RequestHandler.links to get the self and alternate links for the given request
@rldhont rldhont added the enhancement New feature or request label Sep 3, 2021
@rldhont rldhont requested review from Gustry and dmarteau September 3, 2021 15:53
Copy link
Copy Markdown
Member

@dmarteau dmarteau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Links depends It really depends on the structure of the API and I do net really understand the benefits of generating links this way

super().__init__()
# Defined default content types because
# QgsServerOgcApiHandler::contentTypes not available in Python bindings
self._content_types = [QgsServerOgcApi.JSON, QgsServerOgcApi.HTML]
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is no HTML files in the api so this is not apppropriate to pretend that there is HMTL links.

@Gustry Gustry removed their request for review September 10, 2025 12:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants