Closed mathieuancelin closed 4 months ago
When using the HTTP Client API from a JS plugin like this:
const task = { "userId":1, "id":2345, "title":"title", "completed":false }; const request = { method: "POST", url: "https://jsonplaceholder.typicode.com/todos", headers: { "Accept": "application/json", "Content-Type": "application/json", }, }; const response = Http.request( request, JSON.stringify(task), );
it appears that the headers were never sent, hence the target server not being able to parse the body correctly and creating an empty task.
This pull request fix this behavior
Thanks!
When using the HTTP Client API from a JS plugin like this:
it appears that the headers were never sent, hence the target server not being able to parse the body correctly and creating an empty task.
This pull request fix this behavior