Closed gregmsanderson closed 4 years ago
Yeah, I guess we should change it, preferably to something light...
I guess node-fetch would be best? Axios seems quite heavy?
node-fetch seems the smallest, from https://github.com/request/request/issues/3143 so if it does the same, sure, swap for that?
Yeah. I'll review the dependencies in examples too - I think there's some request
mentions in other places.
fetch
is already on www.scramjet.org - so I guess that's easiest to push some simple one liner to get the stream like:
StringStream.from(async () => (await fetch('https://example.org/some.csv')).body)
I'd need to test it first though...
Done and pushed. :)
Oh and at the same time, now this will work:
Scramjet.from(fetch('https://www.example.net/some/resource.txt'))
A small addition. 😄
Hello,
I came across this project and tried the first example shown using StringStream which seems to work great.
However it seems the request package is deprecated. Maybe update the example to instead use axios, fetch etc?
request("https://api.example.org/v1/shows/list")
Thanks!