Skip to content

Conversation

@erunion
Copy link
Member

@erunion erunion commented Apr 8, 2024

🧰 Changes

In September of last year I reworked this library1 off node-fetch and the funky non-native FormData object it ships to only support native FormData -- in the process making code snippet generation asynchronous. Unfortunately this async work is causing us some headaches on integrating it into our API Explorer.

I started to dig in to trying to make formdata-to-string synchronous and realized... why bother? We have the HAR, we can generate everything we need for a multipart boundary from that.

  • Completely removes the FormData and Blob API dependencies from this library.
  • Made .convert() a synchronous operation again.

Footnotes

  1. https://github.com/readmeio/httpsnippet/pull/199

@erunion erunion added enhancement New feature or request refactor Issues about tackling technical debt labels Apr 8, 2024
@erunion erunion requested a review from kanadgupta April 8, 2024 20:07
Copy link

@kanadgupta kanadgupta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wowow so much better 🥹

Co-authored-by: Kanad Gupta <8854718+kanadgupta@users.noreply.github.com>
@erunion erunion merged commit 966ab0e into main Apr 8, 2024
@erunion erunion deleted the feat/remove-formdata-dependency branch April 8, 2024 21:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request refactor Issues about tackling technical debt

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants