Skip to content

Conversation

@lassoan
Copy link
Member

@lassoan lassoan commented Dec 15, 2023

In Qt6, redirects are enabled by default but it has to be enabled manually in Qt5.

Redirects are useful because they allow implementing GET web requests that contain query parameters by only using static HTML pages that can be easily hosted, without having to set up a database (e.g., on GitHub pages).

For example, 3D Slicer extension catalog extension list query request (API call https://example.com/api/v1/app/5f4474d0e1d8c75dfc705482/extension?app_revision=32438&arch=amd64&limit=0&os=win) can be implemented by having a static page (https://example.com/api/v1/app/5f4474d0e1d8c75dfc705482/extension/index.html) containing JavaScript that redirects to the extensions list json file (https://example.com/api/v1/app/5f4474d0e1d8c75dfc705482/extension/extensions-32438-amd64-win.json).

In Qt6, redirects are enabled by default but it has to be enabled manually in Qt5.

Redirects are useful because they allow implementing GET web requests that contain query parameters by only using static HTML pages
that can be easily hosted, without having to set up a database (e.g., on GitHub pages).

For example, 3D Slicer extension catalog extension list query request
(API call https://example.com/api/v1/app/5f4474d0e1d8c75dfc705482/extension?app_revision=32438&arch=amd64&limit=0&os=win)
can be implemented by having a static page (https://example.com/api/v1/app/5f4474d0e1d8c75dfc705482/extension/index.html)
containing JavaScript that redirects to the extensions list json file
(https://example.com/api/v1/app/5f4474d0e1d8c75dfc705482/extension/extensions-32438-amd64-win.json).
@lassoan lassoan requested a review from jcfr December 15, 2023 13:32
@lassoan lassoan self-assigned this Dec 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant