feross / simple-get

Simplest way to make http get requests. Supports HTTPS, redirects, gzip/deflate, streams in < 100 lines
MIT License
401 stars 50 forks source link

Using simple-get in IONIC #58

Closed luckypal closed 3 years ago

luckypal commented 4 years ago

Hello. I am gonna use this package in IONIC, but I can't. (Originally, I am using webtorrent in IONIC) When I run project, it shows error like this. image

I tried to find solution, and fix it to add this in package.json image

It works well when I run this. ionic cordova emulate android -l

But when I build release apk, it doesn't work, because http package can't be used in IONIC or Angular. It shows "protocol.request is not function"

Is there any solution for this?

feross commented 3 years ago

You need to figure how to tell iconic to shim the Node.js http package for you.