dio Questions

4

Solved

hello i try to upload image with dio package but i have to set contentType for image but i can not set it and get this error when set MediaType ====> The method 'MediaType' isn't defined for the ty...
Galitea asked 17/4, 2020 at 19:33

4

I have working with Flutter DIO Library. Its working fine on my Android App but giving error on Web. Error: DioError [DioErrorType.response]: XMLHttpRequest error. If I tried same url with http its...
Bemock asked 2/10, 2021 at 9:8

2

When I add a new value like account-type to the header I get the following error from the dio library DioExceptionType.connectionError ║ The connection errored: The XMLHttpRequest onError callback...
Elaterium asked 2/9, 2023 at 1:10

4

final dio = Dio(); try { await dio.request( 'https://api.example.com/api/v1/auth/validateMobile', data: {"phoneNo": "+91999999999"}, options: Options( method: 'GET', head...
Patin asked 3/10, 2021 at 18:15

7

I have the following code to upload a file. var client = new dio.Dio(); await client.put( url, data: formData, options: dio.Options( headers: headers, ), onSendProgress: (int sent, int total...
Kern asked 6/5, 2020 at 12:21

1

I'm using package:dio in a Flutter web application. Whenever I send a POST request, however, it gets changed into an OPTIONS request. The function that makes the API request looks like this: Future...
Drud asked 10/1, 2022 at 14:52

4

I am calling multiple api's like this await Future.wait([profile, calendar, cities]); I have a interceptor class which extends Dio QueuedInterceptor. Say on profile api, my access token expires an...
Compass asked 11/5, 2023 at 13:40

5

Solved

I have been trying to upload multiple images/files to the backend in Flutter. I am using Dio. So far, I have not been able to do so. I have been able to do so using postman. This is the form-data ...
Oracle asked 5/8, 2020 at 11:5

4

I was wondering if any you can point me to a web flutter library that had http badCertificateCallback. I tried DIO but it is giving me an error and submit an issue but I haven't heard from them yet...
Haematozoon asked 24/4, 2020 at 15:12

2

Solved

I'm trying to optimize API response time for my Flutter app. I have an API where I've added server level caching and I'm using Dio for my API needs. The reponse time when tested on Postman is ~100m...
Diffusivity asked 14/3, 2023 at 10:19

5

I'm trying to download *.xlsx file using dio.download, and it's throwing the errors: Unhandled Exception: FileSystemException: Cannot open file, path = '/storage/emulated/0/Android/data/com.example...
Aneroid asked 24/5, 2022 at 7:10

2

Hello community I have one question I have been trying it for hours I couldn't solve it and have been sending post request to server with Authorization in flutter using DIO library on postman it wo...
Elis asked 14/12, 2021 at 11:6

0

I want to trigger a bloc event inside a dio interceptor (to be precise an onError Interceptor) but for that I need context so I can do something like -> BlocProvider.of<MyBloc>(context).ad...
Shaeffer asked 25/5, 2023 at 11:10

4

Solved

I'm new in flutter development. Recently I heard about Dio and Http packages for api calling. Which is the best one for api calling. If anyone have a better way of api service?? CreateAccountRepos...
Corinnecorinth asked 14/3, 2023 at 5:2

7

With thwe http package I can send an image to a server by putting te binary data in the body of a post call like in the snippet of this code: var response = await http.post('My_url', body: File(pat...
Splitlevel asked 30/6, 2020 at 1:11

2

I'm trying to make an auto suggest input which fetches the results from a backend API. Here is my code: import 'dart:async'; import 'package:flutter/material.dart'; import 'package:hello_world/ap...
Crisp asked 9/9, 2021 at 11:44

3

Solved

I'm using new dart version >=2.12.0 <3.0.0 with null safety enabled. I have added my code for reference. MatchesService import 'package:cric_app/AppUrls.dart'; import 'package:cric_app/featur...
Confirmation asked 24/6, 2021 at 16:12

7

I have an interceptor to send jwt token and to use the refresh_token endpoint when the jwt expires. With an expired jwt I get Error: Bad state: Future already completed error, but the request is p...
Apomixis asked 25/7, 2022 at 9:23

3

like how to fix boilerplate code in separate file and use it in ui pages. I Need to declare this uri variable in separate file and access across over all pages: static var uri = "https://xx...
Hawkshaw asked 18/8, 2020 at 8:53

3

Solved

I have searched for similar questions and answers to this question but haven't found any specific answer till now. I am trying to save downloaded files to my internal phone storage. Preferably the ...
Erotica asked 6/5, 2020 at 21:41

8

Solved

I'm trying on Postman. And it works I want upload some image to rest-api using Package DIO Package , I'm new for this package (i'm use this package just for CRUD operation) and i'm got problem whe...
Larue asked 15/8, 2019 at 12:53

5

I am trying to implement a access token refresh with a Dio interceptor. I have looked at examples I could find, none of which seem to work. Here is my attempt: class AuthInterceptor extends QueuedI...
Cuboid asked 2/9, 2022 at 12:52

1

i have a weird problem with dio package for flutter on iOS device. i wrote an app which sends a GET request to a url. everything works perfectly on Android but looks like the request doesn't go thr...
Theomorphic asked 25/4, 2020 at 17:57

4

We are in a situation where the production app is facing the following socket exception and not able to perform any other network operation after this.  DioError [DioErrorType.DEFAULT]: SocketExcep...
Facetiae asked 5/2, 2021 at 13:12

3

Solved

I need to parse JSON to object and use it in my app but I need to do this using dio library, but I'm new to it, can anybody help me how to use it to parse a JSON into an object, also my request nee...
Infarct asked 9/10, 2020 at 14:17

© 2022 - 2024 — McMap. All rights reserved.