Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUG: Follow redirects in requests in Qt5 #26

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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
1 participant