dio icon indicating copy to clipboard operation
dio copied to clipboard

Duplicate the base url

Open tuyen3962 opened this issue 1 year ago • 4 comments

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

  1. I set the base url in dio.
  2. 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

tuyen3962 avatar Aug 15 '24 02:08 tuyen3962

Screenshot 2024-08-15 at 09 38 45

tuyen3962 avatar Aug 15 '24 02:08 tuyen3962

Please provide a minimal standalone runnable reproducible example.

AlexV525 avatar Aug 15 '24 03:08 AlexV525

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.

tuyen3962 avatar Aug 17 '24 05:08 tuyen3962

Please provide a minimal standalone runnable reproducible example.

AlexV525 avatar Aug 17 '24 06:08 AlexV525