-
Notifications
You must be signed in to change notification settings - Fork 570
net/http package (net/http: neither of Fetch nor XMLHttpRequest APIs is available) #839
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
Comments
Node doesn't seem to provide either one by default, that's why you need a polyfill (either for Fetch or for XHR) for |
Thanks. Worked it out using assistance from #586 Step 1: Step 2: Step 3: |
@shurcooL Do you know how I can make cancelling the specific request work? |
What I have learnt: Dont use net/http to make http requests. On node js, you need to still add |
I created a package that makes it easy: https://github.com/rocketlaunchr/gopherjs-xhr |
Uh oh!
There was an error while loading. Please reload this page.
I am making an electron app.
http.Client
works for render process (inside chromium JavaScript) but doesn't work from main process (node js)It says an error about it not being supported.
How can I make requests from the main process? The compatibility table says I need a polyfill? Why does node js need a polyfill when it works from within chromium. What's the difference?
Is it better to use node library directly or perhaps axios library?
The text was updated successfully, but these errors were encountered: