Questions tagged [flutter-http]

241 questions
0
votes
0 answers

JSON file creation with URL

I want to know how to create JSON file and where to create the URL in flutter. in all examples they are pasting the URL but i want to know where it from.
0
votes
1 answer

How can I add request header automatically using http package

Currently I'm sending header with every request like as follow which is very repetitive. Is there any process so that all my request will have a request header automatically ? Or how can I avoid code repetition for the following lines: …
Fahad Md Kamal
  • 243
  • 6
  • 20
0
votes
1 answer

Flutter HTTP post request sending list of objects

I have successfully got a 200 response code from the server but my API returns response code of 0. When I try to send a request in the postman it response to 1. Maybe I do have something missing in my JSON to send in the body. I'm new to flutter and…
Jayrek
  • 53
  • 2
  • 9
0
votes
2 answers

How to add body in Flutter http request?

I am new in the flutter. And I am trying to work with APIs. I searched on google and found the relevant code but I am not able to add the form data in API request. import 'dart:convert'; import '../models/bill.dart'; Future> getBills()…
0
votes
1 answer

Displaying 'Instance of class_name' instead of data

I am trying to get the data from an API, but when executing the following the code I am getting the response as only 'Instance of class Survey' but not the actual data in the API. Here is the code I am using: Future GetSurvey() async { var…
Ankit
  • 481
  • 1
  • 8
  • 27
0
votes
2 answers

http get call api does not update response. its show the previous response

I am checking the postman and fetch the Get url response is update success. But i am using Flutter Http and Dio library in my project. Get the response does not updated. http Show the previous response. What a problem i am not understanding . Why…
shakeel
  • 11
  • 5
0
votes
2 answers

Future builder not catching the exception

I am trying to make a simple POST request in flutter and trying to catch exception. I am seeing the exception in console but when I do print(snapshot.hasError) inside my FutureBuilder, it gives me false. Since, I am new to flutter I don't know which…
neerav94
  • 429
  • 1
  • 8
  • 15
0
votes
2 answers

How To Fetch Data From API With This Format In Flutter

Endpoint - https://data.geoiq.io/dataapis/v1.0/covid/locationcheck { "key": string, "latlngs": array } [enter image description here][1] How To Fetch Data From API With This Format In Flutter [1]: https://i.stack.imgur.com/V6hVH.png
0
votes
1 answer

FLUTTER: How to access session id and csrf from cache of json api

I'm trying to create a register page in flutter. Using HTTP package to post data to back end and in turn i'm receiving status message. I need to access the session_id(and csrf value) stored in cache of the API, so that i can set its value in shared…
0
votes
1 answer

Flutter Unhandled error type '_InternalLinkedHashMap' is not a subtype of type 'Map'

When calling http.get using the Flutter http package, the following exception gets thrown: Unhandled Exception: Unhandled error type '_InternalLinkedHashMap' is not a subtype of type 'Map' occurred in bloc Instance…
eli2003
  • 400
  • 5
  • 13
0
votes
3 answers

Flutter print any http request automatically - abstract HTTP class

in short words I want to print in my console any Http request that my app is requesting without putting print command after each call I'm making for example : let's say I have service with http.Client.get and I have another 100 service like…
Baraa Aljabban
  • 992
  • 13
  • 22
0
votes
1 answer

Handshake Exception when trying to upload a file using MultipartRequest in flutter

I tried to upload a file to s3 using MultipartRequest in flutter but upon reach "response.send()" i get I/flutter ( 8307): HandshakeException: Handshake error in client (OS Error: I/flutter ( 8307): CERTIFICATE_VERIFY_FAILED: self signed…
0
votes
1 answer

Show data on listview builder from http POST request Result Flutter

I try to Show data on listview builder from http POST request Result in Flutter but I got this error: """ Unhandled Exception: dependOnInheritedWidgetOfExactType<_InheritedTheme>() or dependOnInheritedElement() was called before…
0
votes
1 answer

Parse json data from flask api to flutter lists

I'm working on a project using Flutter & Flask api. I have to grab the data from flask api and save into the lists in a flutter. I'm a beginner for Flutter just getting started, so bear with me for this, please! Here's what I have done so…
Abdul Rehman
  • 5,326
  • 9
  • 77
  • 150
-1
votes
1 answer

Error fetching data by GetX. Error on model define or else

I need to fetch Category Data from my custom made API. I create a model, controller for fetch data from API with help of getx, but it give me error. I don't know what is the problem. Can anybody help me out please? Here is my Category_slider.dart…