molecule icon indicating copy to clipboard operation
molecule copied to clipboard

Accept format middleware

Open testinfected opened this issue 11 years ago • 0 comments

A middleware for automatically adding a format extension at the end of the request path based on the Accept http header.

For instance:

GET /some/resource
Accept: application/json

would become:

GET /some/resource.json
Accept: application/json

testinfected avatar Feb 24 '15 02:02 testinfected