Files: c5c7a8ffadbd51aa28a5f3f096fe43f69405da44 / test / test-79-npm / body-parser / body-parser.js
405 bytesRaw
1 | ; |
2 | |
3 | var parser = require('body-parser'); |
4 | var req = { headers: { } }; |
5 | var res = {}; |
6 | |
7 | var middleware = parser.json(); |
8 | |
9 | middleware(req, res, function () { |
10 | var middleware2 = parser.urlencoded({ extended: true }); |
11 | middleware2(req, res, function () { |
12 | var middleware3 = parser.urlencoded({ extended: false }); |
13 | middleware3(req, res, function () { |
14 | console.log('ok'); |
15 | }); |
16 | }); |
17 | }); |
18 |
Built with git-ssb-web