express-prefer
RFC 7240 defines an HTTP header field that can be used by a client to request that certain behaviors be employed by a server while processing a request.
This package parses the HTTP Request and makes the prefer
headers a keyed property of req.prefer
.
Getting started
$ npm install express-prefer --save
then add to your server.js
file
app
Usage
Given the following Request
PATCH /my-document HTTP/1.1Host: example.orgContent-Type: application/json-patch+jsonPrefer: return=representation [{"op": "add", "path": "/a", "value": 1}]
then
app
License
The MIT license
Copyright © 2015 Richard Schneider (makaretu@gmail.com)