KOA-AJAX-PARAMS
The Koa Middleware used to auto parse get & post request params.
Install
npm i koa-ajax-params
yarn add kao-ajax-params
Usage
For POST Request, when Content-Type is application/json
,
middleware will auto parse body data to json that can be get from this.param.post
.
For GET Request, you can get url query from this.param.get.xxx
.
;;; const app = ;const route = prefix: '/api'; route ;
Content-Type Support
- application/json
Feature
- Support
application/x-www-form-urlencoded
- Support
multipart/form-data
- Support
text/xml