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

Implement HEAD queries #113

Open
thbar opened this issue Jan 18, 2021 · 1 comment
Open

Implement HEAD queries #113

thbar opened this issue Jan 18, 2021 · 1 comment
Labels
enhancement New feature or request

Comments

@thbar
Copy link
Collaborator

thbar commented Jan 18, 2021

When playing with data, it is very common to use curl -I (aka --head) to fetch only the headers.

Currently doing so on this app will return a 404, which can be a bit confusing too to newcomers.

I am unsure how costly it would be to implement that at the moment given my current knowledge of Actix.

Maybe there is a nice trick in Actix to ensure most GET queries can also be transformed to HEAD more or less automatically.

Less urgent than other enhancements, but still nice to have!

@thbar thbar added the enhancement New feature or request label Jan 18, 2021
@thbar
Copy link
Collaborator Author

thbar commented Jan 18, 2021

BTW, one trick to still show headers is to override the method after passing -I like this:

$ curl -I -X GET https://tr.transport.data.gouv.fr
HTTP/1.1 200 OK
content-length: 17808
content-type: application/json
date: Mon, 18 Jan 2021 10:49:47 GMT
Sozu-Id: 3c232174-837f-4e93-be84-3ee81aff10e4

(source: https://stackoverflow.com/a/38679650)

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

No branches or pull requests

1 participant