then/then-request

Sending body

Closed this issue · 1 comments

I just tried to send some POST data to an already existing API. It informed me that certain required fields were not found in the body. After quickly looking through the module's code, I saw that the body in "index.js" (after line 59) is not set for the request.

This is how I made the request:
var HTTP = require("the-request"); HTTP(method, url, { headers: {...}, body: JSON.stringify({...}) });
The body was a JSON object, but I set the header myself.

The same request seemed to work fine with the "request" module.
I don't know if this is an actual bug, but I just wanted to make you aware of this.

If you can provide a runnable example, perhaps targeting https://requestb.in, I will investigate. As it is, it's totally unclear what headers/body are not being sent. I don't even know which http method you were using.