Files: efcf9fd06b02fa9bcd28681b4c777224e19702bb / test / test-79-npm / method-override / method-override.js
250 bytesRaw
1 | ; |
2 | |
3 | var override = require('method-override'); |
4 | var req = { method: 'GET', headers: { } }; |
5 | var res = {}; |
6 | |
7 | var middleware = override(); |
8 | |
9 | middleware(req, res, function () { |
10 | if (req.originalMethod === 'GET') { |
11 | console.log('ok'); |
12 | } |
13 | }); |
14 |
Built with git-ssb-web