0.0.5 • Published 7 years ago

circe-body-parser v0.0.5

Weekly downloads
4
License
MIT
Repository
github
Last release
7 years ago

circe-body-parser 请求体解析

支持jsontextform类型

安装

NPM

使用

import * as Koa from 'koa'
import bodyParser from 'circe-body-parser'

const app = new Koa()

app.use(bodyParser())

app.use(async (ctx) => {
  ctx.body = ctx.request.body
})

参数

  • onError?: (err: Error, ctx: Koa.Context) => void
  • encoding?: string = 'utf-8'
  • jsonLimit?: string = '1mb'
  • formLimit?: string = '56kb'
  • textLimit?: string = '56kb'
  • multipart?: boolean = false
  • formidableOptions?: IIncomingFormOptions = {}
    • 参考:formidable
    • encoding?: string
    • uploadDir?: string
    • keepExtensions?: boolean
    • maxFieldsSize?: number
    • maxFields?: number
    • hash?: string | boolean
    • multiples?: boolean
    • type?: string
    • bytesReceived?: number
    • bytesExpected?: number
0.0.5

7 years ago

0.0.4

7 years ago

0.0.3

7 years ago

0.0.2

7 years ago

0.0.1

7 years ago