0.7.0 • Published 6 years ago

koa-accepts v0.7.0

Weekly downloads
2
License
MIT
Repository
github
Last release
6 years ago

koa-accepts

CircleCI

Simple middleware to change the format of your response based on the HTTP accept header, using q weights via the negotiator library.

Supported formats:

  • application/yaml: YAML
  • application/x-msgpack: MsgPack
  • application/json: JSON.stringify

If anything else it will fall back to doing what koa normally does (JSON).

Quickstart

import * as koa from 'koa'
import accepts from 'koa-accepts'

const app = new Koa()

app.use(accepts())
0.7.0

6 years ago

0.6.3

6 years ago

0.6.2

6 years ago

0.6.1

6 years ago

0.6.0

6 years ago

0.5.1

6 years ago

0.5.0

6 years ago

0.4.0

6 years ago

0.3.1

6 years ago

0.3.0

6 years ago

0.2.2

6 years ago

0.2.1

6 years ago

0.2.0

6 years ago

0.1.1

6 years ago

0.1.0

6 years ago

0.0.1

6 years ago