dart-http Questions

3

I'm currently trying to access a Web API in Flutter that requires a JWT access token for authorization. The access token expires after a certain amount of time. A new access token can be requeste...
Judah asked 29/6, 2018 at 7:59

2

Solved

I'm trying to load a client certificate to a http.client from the http.dart package. I'v seen multiple answers on how to do it using the HttpClient class, like this answer: Flutter add self signed ...
Supremacy asked 17/1, 2022 at 12:28

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

4

Solved

This problem has already been pointed out by others (like here). Althought I may have understood the cause, I still haven't found a solution when using the higher-level http library. For example: ...
Cornu asked 13/7, 2018 at 13:1

4

Solved

I am making an http post request using http dependency. I am facing the below error in my response. I am posting my code below: flutter: Error on line 1, column 32: Invalid media type: expected /[...
Hyperspace asked 6/8, 2019 at 4:50

3

Solved

I have a multiword String that I'd like to convert to a GET request parameter. I have an API endpoint /search that takes in the parameter query. Now typically your request would look like http://...
Clementina asked 18/4, 2018 at 11:58

2

Solved

I'm trying to return a snapshot error state to my StreamBuilder when my provider has problems during the http.get() call. In my case I throw an exception when the the http.get() return a state diff...
Dael asked 20/6, 2019 at 12:28

2

Solved

I'm attempting to build a Flutter app where I'm required to make an HTTP call using the dart http library. So here's a snipped of the fu I use to make the call, import 'package:flutter/material.da...
Rakehell asked 16/4, 2018 at 11:4

3

Solved

I am uploading a file using MultipartRequest from package:http. I am successfully uploading the file but I want to get the progress of the file that is being uploaded. How can I achieve that? My cu...
Helban asked 11/12, 2018 at 16:0

1

Solved

I'm trying to make a progress bar indicator for a downloading file, but if I add a listener to the StreamedResponse, the piping works, but does to not finish its future. final client = new http.Cl...
Impact asked 17/6, 2019 at 20:58

0

Question is: how to store on sqlite? I mean how to store 2 APIs data on 2 tables? I have multiple APIs to get and store data on the cache. currently, I do it one by one, like this: button presse...
Varian asked 17/6, 2019 at 11:1

1

Solved

I'm trying to understand the difference between the http package and the HttpClient class in the dart:io library. My purpose is to known when I should use which. I see both of them used to apparent...
Accentuate asked 27/2, 2019 at 18:6

1

Solved

My server provides a Self Signed certificate when calling its HTTPS API. I have the certificate file in the asset folder and referenced its path in pubspec.yaml I have tried passing the certificat...
Falsify asked 9/1, 2019 at 6:57

2

Solved

I want to make to multiple requests to same server in an optimal way. So I have Future<List<Item>> getAllItems() async { var client = new http.Client(); List<String> itemsIds ...
Binoculars asked 25/4, 2018 at 16:57

1

Solved

https://pub.dartlang.org/packages/shelf_web_socket shows this example import 'package:shelf/shelf_io.dart' as shelf_io; import 'package:shelf_web_socket/shelf_web_socket.dart'; void main() { v...
Enrichetta asked 3/10, 2014 at 6:26
1

© 2022 - 2024 — McMap. All rights reserved.