apstanisic / directus-dart

Directus SDK for Dart and Flutter
MIT License
37 stars 23 forks source link

Not working with Dio 4.0.4 #34

Closed awesome-developer-20 closed 1 year ago

awesome-developer-20 commented 2 years ago

Dio client is stuck at sending request when using 4.0.4 version. If I remove first interceptor (DirectusSingleton.instance.client.interceptors.removeAt(0);) it works properly. I don't know why 😕

It is working fine with Dio 4.0.0

Maybe there is a breaking change in Dio interceptor api

awesome-developer-20 commented 2 years ago

Maybe you have to add return handler.next(options) at the end here

image

Like this

image

apstanisic commented 2 years ago

I think you're right. Dio changed their API and I didn't migrate properly in every place. Can you test if it works and send a PR?

apstanisic commented 2 years ago

I've published 0.7.1. Can you check if it fixes the issue?

apstanisic commented 1 year ago

Please reopen if issue is not fixed