We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Following:
Link: rel="alternate"
I implemented it for tables and rows but I should have done queries as well.
The text was updated successfully, but these errors were encountered:
b72b242
I just realized I can refactor this to make it much simpler.
Sorry, something went wrong.
Refactored alternate_url_json mechanism, refs #1620, #1533
8d5779a
% curl -s -I 'https://latest.datasette.io/' | grep link link: https://latest.datasette.io/.json; rel="alternate"; type="application/json+datasette" % curl -s -I 'https://latest.datasette.io/fixtures' | grep link link: https://latest.datasette.io/fixtures.json; rel="alternate"; type="application/json+datasette" % curl -s -I 'https://latest.datasette.io/fixtures?sql=select+1' | grep link link: https://latest.datasette.io/fixtures.json?sql=select+1; rel="alternate"; type="application/json+datasette" % curl -s -I 'https://latest.datasette.io/-/plugins' | grep link link: https://latest.datasette.io/-/plugins.json; rel="alternate"; type="application/json+datasette"
I ran the following on https://www.google.com/ in the console to demonstrate that these work as intended:
[ "https://latest.datasette.io/fixtures", "https://latest.datasette.io/fixtures?sql=select+1", "https://latest.datasette.io/fixtures/facetable" ].forEach(async (url) => { response = await fetch(url, {method: "HEAD"}); console.log(response.headers.get("Link")); });
No branches or pull requests
Following:
Link: rel="alternate"
header pointing to JSON for a table/query #1533I implemented it for tables and rows but I should have done queries as well.
The text was updated successfully, but these errors were encountered: