Thanks, for the answer. It's so many util to me. Im my case, the application use our proxy application and the request was working without this proxy, but with proxy the the response arrive with 400 code.
Case:
I need send a request with content-length: 0
What i was make:
What ocurred was that the request send with header content-length: 0, and i have's set this headers, but too sended a empty body in .send() method.
Solution:
Created a unirest request, without .send(), because the content is empty, it's working to me.
// the wrong code:
let req = unirest
.post(url)
.proxy(myProxy)
.headers(myHeaders)
.send({})
...
req.end(funcCallback)
// the correct code:
unirest
.post(url)
.proxy(myProxy)
.headers(myHeaders)
...
req.end(funcCallback);