axios-fetch
axios-fetch copied to clipboard
fix: set body to null if given empty buffer
Raised for: https://github.com/lifeomic/axios-fetch/issues/127
Here's a PR that verifies the body is null. If the result data is an empty buffer, pass null as body instead.
Ideally I would like to verify the node16-18 behaviour but the tests here hard-code the fetch
and Response
implementation to utilise node-fetch
which behaves differently to node18s native fetch
that utilises undici
.