1.0.4 • Published 7 years ago

think-raw-body v1.0.4

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

think-raw-body

raw body middleware for ThinkJS 2.2.12, you can get text/plain(raw) type data,when you used 'this.post()' in controller.

Install

npm install think-raw-body --save

How to use

register middleware

create file if not exist, src/common/bootstrap/middleware.js.

import rawBody from 'think-raw-body';
think.middleware('raw_body', rawBody);

config hook

create file if not exist, src/common/config/hook.js.

export default {
    payload_parse: ['prepend', 'raw_body']
}

LICENSE

MIT

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago