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

Add 'head' http method support #19

Closed
jeremydaly opened this Issue Mar 28, 2018 · 1 comment

Comments

Projects
None yet
1 participant
@jeremydaly
Copy link
Owner

jeremydaly commented Mar 28, 2018

It would be useful to have the ability to also process HEAD requests as an alternative to GET if you're looking for just the headers. While I suppose that we could create a head() convenience method, it seems like a lot of duplicate work.

Without being overly opinionated, Lambda API could respond to any HEAD request so long as there was a corresponding GET route for it and then short circuit the response to omit the body. If there were a specific response for HEAD requests, those could always be overwritten by an explicit head() route, although it should still probably enforce the response short circuiting.

@jeremydaly jeremydaly added this to the v0.5 milestone Apr 6, 2018

@jeremydaly

This comment has been minimized.

Copy link
Owner

jeremydaly commented Apr 24, 2018

I implemented this using just an alias for GET methods. Any HEAD request will match a corresponding GET path and return with a blank body.

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