Closed literakl closed 4 years ago
Try latest version, should work. I fixed, seems still not working properly .
Can you explain bit more?
I running body-parser
example locally with some logging.
.
[Object: null prototype]
- it's OK, but for now at least, this happens due of querystring
parse
function which does with Object
something, but it's works same as `Object.Try re-run or create minimal reproducible repository to debug.
Thanks for reporting bugs
JSON application type is parsed correctly, when I send the request from Postman, so you can close this issue. But I am stuck with frontend https://stackoverflow.com/questions/60763165/axios-post-stalled-in-chrome.
It is CORS issue. How can I write OPTIONS handler with empty body? I tried this, but it did not help for chrome and it does not return anything to Postman until time out.
app.options('/v1/authorizeUser', async (req, res) => { console.log("OPTIONS authorizeUser"); res.status(200); res.setHeader("Access-Control-Allow-Origin", "*"); res.setHeader("Access-Control-Allow-Methods", "POST, GET, OPTIONS, DELETE"); return res; });
Version 1.1.8
URL encoded www form data:
{"email":"literak@seznam.cz","password":"centrum"}:
body: [Object: null prototype] { '{"email":"literak@seznam.cz","password":"centrum"}': '' }
Nanoexpress thinks that this is a key with empty value.
so this fails: