-
-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix Content-length on httpApiCall #250
Fix Content-length on httpApiCall #250
Conversation
f3eb0a4
to
f1f1564
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do not think we need to extract customHeaders as a separate function
I agree with you and I don't really like this approach either, but then we won't be able to test it |
d72c8ef
to
837e26b
Compare
lib/network.js
Outdated
if (body) headers['Content-Length'] = Buffer.byteLength(body); | ||
const options = { method, headers: custom, body }; | ||
return await fetch(url, options).then(async (res) => { | ||
headers['Content-Type'] = mimeType; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will change incoming arguments
#234
npm t
)npm run fmt
)