+2
-1
| const {json} = require('micro') | ||
| const {parse} = require('content-type') | ||
| const urlencoded = require('urlencoded-body-parser') | ||
| module.exports = async (req) => { | ||
| switch (req.headers['content-type']){ | ||
| switch (parse(req).type){ | ||
| case 'application/json': | ||
@@ -7,0 +8,0 @@ return await json(req) |
+2
-1
| { | ||
| "name": "micro-body", | ||
| "version": "0.0.2", | ||
| "version": "0.1.0", | ||
| "description": "micro body parser", | ||
@@ -26,2 +26,3 @@ "main": "index.js", | ||
| "dependencies": { | ||
| "content-type": "^1.0.4", | ||
| "micro": "^9.1.0", | ||
@@ -28,0 +29,0 @@ "urlencoded-body-parser": "^2.0.1" |
1096
5.59%13
8.33%3
50%+ Added
+ Added