Repro of issue with withContent.
To run:
- Install and run dev server (uses
npmbelow, but use whatever package manager you like):
git clone [email protected]:smcstewart/itty-router-without-content.git
cd itty-router-without-content
npm install
npm run dev- Open a new terminal and run
cURL(or whatever else you like: e.g.httpie) and perhaps something likejqfor a pretty-printed response:
curl -v --request POST \
--url http://localhost:8787/ \
--header 'Content-Type: application/json'- You will see a HTTP
500Internal Server Errorand the following JSON response:
{
"status": 500,
"error": "Unexpected end of JSON input"
}