Sansossio/twisted

Incompatible with Deno

Closed this issue · 2 comments

Hi! Thanks for this library. It's made interacting with the Riot API much simpler.

I'm trying to move my project over to Deno. Deno is mostly compatible with Node/NPM modules, but there are some differences. One issue I ran into is how Deno sends HTTP requests. It calls toString on header values, which is an issue with this library because the Originheader is set to null, which produces an error.

https://github.com/denoland/deno/blob/main/ext/node/polyfills/_http_outgoing.ts#L253

https://github.com/Sansossio/twisted/blame/7cf11d3a2b4176b89de5632d90853b38fc023e97/src/base/base.ts#L211C21-L211C21

Hi @Sansossio!

Would you be willing to accept a PR that makes this package compatible with Deno? I'd be happy to contribute.

By the way, I've used your library to create a cool Discord bot that posts match reports to a Discord channel. Thanks for making this possible!

CleanShot 2023-11-22 at 12 58 38@2x

hey @shepherdjerred ! what a nice project congratulations!👌🏻

I have never used deno but of course create the pr! (dont forget to update package version to be able to publish it)