Duplicate the base url
Package
dio
Version
5.5.0+1
Operating-System
Android, iOS
Adapter
Default Dio
Output of flutter doctor -v
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.22.3, on macOS 14.4 23E214 darwin-arm64, locale
en-VN)
[✓] Android toolchain - develop for Android devices (Android SDK version 35.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 15.4)
[✗] Chrome - develop for the web (Cannot find Chrome executable at
/Applications/Google Chrome.app/Contents/MacOS/Google Chrome)
! Cannot find Chrome. Try setting CHROME_EXECUTABLE to a Chrome executable.
[✓] Android Studio (version 2024.1)
[✓] VS Code (version 1.92.0)
[✓] Connected device (3 available)
[✓] Network resources
! Doctor found issues in 1 category.
Dart Version
No response
Steps to Reproduce
- I set the base url in dio.
- But sometime call api, it will duplicate the base url. However sometime it does not happen.
Expected Result
No duplicate base url
Actual Result
Sometime it duplicate the base url when calling api
Please provide a minimal standalone runnable reproducible example.
When I call two API at the same time, it will have the base url in the path of second API. Now the first time I call login API, and the second time I call API to update my fcm token to profile. In the second time, it will call api twice and the last time of api will be duplicate. Please check it for me.
Please provide a minimal standalone runnable reproducible example.