You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm not sure if this is a bug, or a feature request. We use nodejs to test our projects when compiled with dart2js, but we noticed that the HTTP APIs don't seem to work on nodejs, but do within Chrome.
Thanks Zekfad, if that's addressed to me, I don't control how the 'package:http/http.dart' package works internally, but it should be agnostic to the platform dart is running on. As a workaround, that may be suitable suggestion, but for now, I've just switched all our testing to the Chrome browser.
You can use userland client implementation, e.g. fetch_client uses fetch api to implement http client. That in theory should work fine, if node is 18+, with global fetch function.
I'm not sure if this is a bug, or a feature request. We use nodejs to test our projects when compiled with dart2js, but we noticed that the HTTP APIs don't seem to work on nodejs, but do within Chrome.
Take for example
Dart VM
Chrome
Make sure your webserver returns a appropriate CORS header, e.g "Access-Control-Allow-Origin: *"
Node (which fails)
The text was updated successfully, but these errors were encountered: