Skip to main content

Body Parsing


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.


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).


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

curl -X POST URL_GOES_HERE -d "hello world"