-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Dio can not request https://domain:port #2166
Comments
You're using a outdated package version and an unknown Dart version. We no longer support Dio 4.x. Besides, please check your internet connection and permission on your devices. |
Dart SDK version: 3.4.0-190.0.dev (dev) (Thu Feb 29 08:14:33 2024 -0800) on "macos_arm64" I do not think it cause by my network, I can get responses from Chrome browser and Postman when I call I create a new empty flutter project, chose Dio 5.4.2. It is the same error. |
Package
dio
Version
4.0.6
Operating-System
Android, iOS
Adapter
Default Dio
Output of
flutter doctor -v
Dart Version
3.20.0
Steps to Reproduce
Use Dio to request(Get Method) https://www.abc.com:5001/api/test.
It will throw the error "No address associated with hostname". But the webapi is running well, I am sure I can use postman to get data from same API URL.
If I use my domain(https://www.abc.com/api/test) as the default port(443), then Dio works as expected.
Why Dio dose not support https://domain:port this way?
Expected Result
get the json output
Actual Result
Get the error “No address associated with hostname”
The text was updated successfully, but these errors were encountered: