Skip to content

A minimal reproducible example of Dio throwing an exception when using a relative base url and a working workaround.

Notifications You must be signed in to change notification settings

mitryp/dio_assert_demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dio_assert_demo

A minimal reproducible example of Dio throwing an exception when using a relative base url and a working workaround.

Steps to reproduce

  1. git clone https://github.com/mitryp/dio_assert_demo.git && cd dio_assert_demo
  2. flutter pub get && flutter run

    Select an appropriate browser and see the exception in the terminal.

  3. Comment out the first declaration of Dio in lib/main.dart and uncomment the second one. Open the network tab in the devtools in your browser.
    Press Shift+R in the terminal to reload the project.
    Check the network tab and see the request to the endpoint localhost:<port>/api/ which is the correct behavior.

About

A minimal reproducible example of Dio throwing an exception when using a relative base url and a working workaround.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published