node-libcurl
node-libcurl copied to clipboard
fix(curly): use default content-type when there are no headers
When using a sftp://
url, this headers
variable is an empty array, which breaks the Object.entries
call.
This PR adds a bounds check so the default content-type will be chosen if the headers variable is empty.
I failed to get this to work with my vite-based project, something about 'exports not defined'. It does work if I manually patch the dist/
javascript. So, I'll leave the verification to you.
Thanks, Liam