axios-fetch icon indicating copy to clipboard operation
axios-fetch copied to clipboard

fix: set body to null if given empty buffer

Open tompuric opened this issue 1 year ago • 0 comments

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.

tompuric avatar Apr 06 '23 05:04 tompuric