Search code examples
javascriptnode.jsexpressurlencodemultipart

urlencoded Vs form-data in Node.Js


Is there any quick way to determine whether passing data is urlencoded or form-data (multiparty) data in Node.JS?


Solution

  • Check the request's Content-Type header value: console.log(req.headers['content-type']);