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

Need support for HEAD requests #72

Open
UcDust opened this issue Nov 27, 2023 · 0 comments
Open

Need support for HEAD requests #72

UcDust opened this issue Nov 27, 2023 · 0 comments
Assignees

Comments

@UcDust
Copy link
Contributor

UcDust commented Nov 27, 2023

This is related.

In Aggie Experts, we need the ability to make HEAD requests and get a response that shows whether the document exists in ES.

In the current use case, we'd like to make a HEAD request to see if an expert exists in the app, and if not, we'd like to hide a link to the experts' profile.

Currently, the GET route in default-api.js is returning a 200 status code as an error, but with the HEAD request there is no body describing the error.

Something like this could work-
Screenshot 2023-11-27 at 09 53 11

Although I'm not sure which status code we'd want to return. Or we could create a HEAD route instead of letting Express default to the GET route.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants