infinitered / apisauce

Axios + standardized errors + request/response transforms.
MIT License
2.8k stars 184 forks source link

Null request body sent as 'null' string #291

Open grimsa opened 2 years ago

grimsa commented 2 years ago

We observed this after upgrading apisauce from 1.1.2 to 2.1.5

We had code similar to apisauceInstance.post('some-url', null, configObject) which then resulted in a null (as a four-letter string) being sent as a request body.

Changing to apisauceInstance.post('some-url', undefined, configObject) reverted to the expected behavior (no request body sent).

This seems to be similar to https://github.com/infinitered/apisauce/issues/9