matrix-org / matrix-js-sdk

Matrix Client-Server SDK for JavaScript
Apache License 2.0
1.59k stars 585 forks source link

Can "request" be switched with, "node-fetch" within this sdk? #2570

Closed tearfulnumpty closed 2 years ago

tearfulnumpty commented 2 years ago

Is your feature request related to a problem? Please describe. The request npm package is deprecated as of ~two years ago. It is used in the matrix-js-sdk for various workarounds.

Describe the solution you'd like A swap of "request" over to "node-fetch" would be great for a workaround to the above problem #2415

Describe alternatives you've considered In place of matrix-js-sdk relying on node-fetch, if it was possible to avoid the above error from #2415 without using request, this could be a valid solution depending on the exact solution found.

Additional context Work is being done to create a matrix plugin for the Shinobi CCTV NVR software project. Notifications from events (such as motion detection on a security camera) are to be sent to a Matrix server from Shinobi, using the matrix-js-sdk as a sort of, "plugin" for Shinobi. The error mentioned above at #2415 appears without the added workaround in place. Due to the deprecated status of the request package, the developer of Shinobi would like to avoid using it in favor of the node-fetch package.


Thanks for your time! I appreciate it a lot.

moeiscool commented 2 years ago

I second this, I would really like to include Matrix Notifications in Shinobi but cannot unless request is removed :( Thank you for considering this change.

t3chguy commented 2 years ago

Duplicate of https://github.com/matrix-org/matrix-js-sdk/issues/801