diet-json-body

1.0.1 • Public • Published

diet-json-body

Adds a little extra gas to Diet's JSON body parser

Diet actually already does JSON body parsing, but there's a bug which causes it to fail when the content-type is application/json;charset=UTF-8 which is the most commonly used content-type when sending JSON.

There's an open pull request that addresses this, but who knows when that'll be merged in. This is a fix in the meanwhile. I'll update the README should this module become obsolete.

npm install diet-json-body
const server = require('diet')
const jsonBody = require('diet-json-body')

var app = server()

app.header(jsonBody)

/diet-json-body/

    Package Sidebar

    Install

    npm i diet-json-body

    Weekly Downloads

    3

    Version

    1.0.1

    License

    MIT

    Unpacked Size

    4.29 kB

    Total Files

    5

    Last publish

    Collaborators

    • cutejs