Skip to content

Need support for HEAD requests #72

Description

@UcDust

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions