koa-json-body
Advanced tools
Comparing version 0.0.2 to 0.0.3
@@ -9,2 +9,4 @@ 'use strict'; | ||
return function *(next) { | ||
this.request.body = {}; | ||
try { | ||
@@ -14,3 +16,4 @@ if (this.is('application/json')) { | ||
} | ||
} catch(e) {} | ||
} catch(e) { | ||
} | ||
@@ -17,0 +20,0 @@ yield next; |
{ | ||
"name": "koa-json-body", | ||
"version": "0.0.2", | ||
"version": "0.0.3", | ||
"description": "koa middleware to parse json request bodies", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -6,3 +6,3 @@ koa-json-body | ||
This will not parse anythig but valid JSON request bodies. If there is a JSON error, the middleware will currently skip the request. | ||
This will not parse anythig but valid JSON request bodies. If there is a JSON error, the middleware will set `ctx.request.body` to `{}` and continue. | ||
@@ -9,0 +9,0 @@ Installation |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2093
16