feathers icon indicating copy to clipboard operation
feathers copied to clipboard

express/rest: HEAD request?

Open Gounlaf opened this issue 5 years ago • 0 comments

Hi,

I'm looking to support HEAD requests. I don't see any mapping to support them as a "service method". But I see that express call the GET ones if no HEAD is mapped.

http://expressjs.com/en/api.html#routing-methods:

The app.get() function is automatically called for the HTTP HEAD method in addition to the GET method if app.head() was not called for the path before app.get().

The GET service is actually call.

Should I create a middleware to inject the original verb, or maybe the complete request in the hook context, something like this in documentation?

Thanks,

Regards.

Gounlaf avatar Oct 22 '19 15:10 Gounlaf