koa-bodyparser-ts:打字稿中的koa-bodyparser

时间:2021-02-16 13:35:44
【文件属性】:
文件名称:koa-bodyparser-ts:打字稿中的koa-bodyparser
文件大小:63KB
文件格式:ZIP
更新时间:2021-02-16 13:35:44
middleware typescript body-parser koajs koa2 koa-bodyparser-ts 基于koa人体分析器。 支持json , form和text类型的身体。 安装 npm install koa-bodyparser-ts --save 用法 import * as Koa from "koa" ; import bodyParser from "koa-bodyparser-ts" ; const app = new Koa ( ) ; app . use ( bodyParser ( ) ) ; app . use ( async ctx => { // the parsed body will store in ctx.request.body // if nothing was parsed, body will be an empty object {} ctx . body = ctx . request .
【文件预览】:
koa-bodyparser-ts-master
----.travis.yml(590B)
----package.json(2KB)
----tslint.json(744B)
----tools()
--------build.js(469B)
----test()
--------index.spec.ts(17KB)
----LICENSE(1KB)
----package-lock.json(276KB)
----src()
--------index.ts(8KB)
----.npmignore(124B)
----tsconfig.json(402B)
----.gitignore(583B)
----CHANGELOG.md(4KB)
----README.md(3KB)
----.vscode()
--------launch.json(827B)
--------tasks.json(533B)

网友评论