Body Parsing

Introduction

Light uses micro under the hood. As a result, it does not parse the body for you by default. However, inside of the context (along with req, and res objects), it includes the async functions buffer, text, and json to help you process the body. Not parsing the body automatically allows other routes to run quicker.

note

If you are looking at micro's docs, please note that you do not pass the req parameter, because light does it for you. Instead only pass in the second options parameter (optional).

Example

Run the following command to make a request to the URL provided in the example

curl -X POST URL_GOES_HERE -d "hello world"