superfaceai / one-sdk-js

1️⃣ One Node.js SDK for all the APIs you want to integrate with
https://superface.ai
MIT License
47 stars 3 forks source link

Fix handling Buffers in `multipart/form-data` #292

Closed freaz closed 2 years ago

freaz commented 2 years ago

Description

This PR fixes handling Buffers in multipart/form-data. It also adds support to duplicate fields by allowing define array as value.

Switched from isomorphic-form-data to form-data, which handles buffers correctly.

Also, I had to fix fetch.node.test.ts where the mocking wasn't working as expected. https://github.com/superfaceai/one-sdk-js/pull/292/commits/6c193a8ed0fd65779475c4830c8e426d01749b9b

Motivation and Context

Fixes #291

Types of changes

Checklist: