-
Notifications
You must be signed in to change notification settings - Fork 1
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
feat: add @purplet/rest
to replace @discordjs/rest
#33
Conversation
I'm bad at github, didn't mean to do that lmao |
lmao nice. oh we'll shouldn't make anything different happen |
last two commits implement files with form data. it's significant because the second commit changes the polyfill to mirror the web apis, so the implementation in rest is super simple. |
@purplet/rest
@purplet/rest
to replace @discordjs/rest
|
ready for code review. |
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.
Needs to be tested before full 1.0.0 release
Otherwise, LGTM
Closes #7 by implementing a rest client. Instead of explicitly relying on node.js or bun directly, we are using web standards and then
@purplet/polyfill
to add missing standards.as it stands right now you need the polyfill for both runtimes: node <18 doesn't support fetch and formdata, and bun and node 18 have fetch but not formdata. this will probably get better in the future but idk how long that will be.
I also want to note this has modifications to
@purplet/polyfill
to get formdata working