Questions tagged [flutter-http]

241 questions
1
vote
2 answers

Dart/Flutter: not working function http.get

I am very new to Flutter, and stuck at the following problem: My function to get a list of books using googleapis: Future cercaLibri(String ricerca) async { final String dominio = 'www.googleapis.com'; final String percorso =…
1
vote
1 answer

Flutter || How to send Put request to server when user click on checkbox

I want to perform Update data over the internet when the user clicks on the checkbox it should change to tick mark done and send put request to the server where manualBillCompletion turns: true before the user clicks on the checkbox it was on…
1
vote
2 answers

Flutter http.post body is an empty object on nodejs?

My Flutter http.post request is sending an empty body to my Node.js server. Here is my front-end code: var response = await http.post(Uri.parse('$host/api/new'), body: { 'id': '$id', 'token': token …
Page COW
  • 515
  • 13
  • 31
1
vote
0 answers

How to not follow redirects on Flutter Web

I can't figure out how to make a POST request that dosen't automatically follow redirects on Flutter Web. I've tried using Flutter's HTTP library, Dart's HTML library, and a third party plugin Dio, and set the followRedirects flag to false on all of…
systemdev
  • 33
  • 5
1
vote
1 answer

How can I show shop wise products?

I am using the Django rest framework to create an eCommerce API. I made API and tried to fetch data using the HTTP package for flutter and dart. I fetched the shops/restaurants but now I want to fetch shop-wise product. I mean when I tap a…
Sakib ovi
  • 537
  • 3
  • 19
1
vote
0 answers

I want to fetch the data using api in flutter just like django

I am trying to build freelancing type app. I am using flutter and for my backend data i created an api using django rest framework. Here is the models.py: class Package(models.Model): management_duration_choices = ( ("1", "1"), …
Sakib ovi
  • 537
  • 3
  • 19
1
vote
1 answer

getting different response in flutter post request compared to other rest clients

I'm getting different response from the api if call it using flutter Response in YARC REST Client: Response in Flutter: The first line is the json sent to the api. The error showm in api log: Failed to parse json data from…
Reghunaath A A
  • 3,130
  • 4
  • 7
  • 18
1
vote
0 answers

Flutter app fail when download PDF from webhosting

We have education app created with Flutter, this app very same to Udemy app features. in this app the course may contain videos lectures of PDF files all things working well except PDF downloading The situation is: when user click on PDF file name…
slackgate
  • 57
  • 2
  • 7
1
vote
3 answers

How to take a certain data index of Future item

I Have a problem to take the newest data index class User { final String idUser, name, phone; User( {this.idUser, this.name, this.phone}); factory User.fromJson(Map json) { return User( idUser:…
Alfan
  • 19
  • 5
1
vote
2 answers

How to get content-disposition header in flutter with http package?

With package https://pub.dev/packages/http I can send post request with await http.post() and get http.Response which have Map parameter headers. Problem is that that header variable returns only part of response headers like {cache-control:…
1
vote
1 answer

How to uncompress http response in Flutter

I using an API which compresses the response with brotli, the google chrome automatically uncompressing and showing the response. But flutter is showing compressed code which is encoded with br. Lemme know how to uncompress the response. Any help is…
Jestin
  • 578
  • 5
  • 10
1
vote
1 answer

Exception caught by widgets library RangeError (index): Invalid value: Not in inclusive range 0..35: 36

Widget build(BuildContext context) { return Scaffold( appBar: AppBar( title: Text( 'Products', ), ), body: Center( child: FutureBuilder( future: fetchPhotos(), builder:…
user16867349
1
vote
0 answers

flutter showing Unhandled Exception: FormatException: Filter error, bad data error

when I am trying to make an HTTP request in flutter I am receiving these errors on a particular API and I am unable to figure out what it means and how to resolve this error is it API is working properly in postman and browser > E/flutter (15337):…
Rohit Sainik
  • 452
  • 6
  • 15
1
vote
1 answer

flutter multi-platform user-agent

I'm developing a multiplatform project with flutter for Android, iOS, and web. How can I get user-agent for adding to the header of the request? I use http package for requests. the sample user agent that I want: Google sdk_gphone_x86, Android…
Abbas Asadi
  • 265
  • 1
  • 5
  • 14
1
vote
1 answer

Https 403 Forbidden Error In Flutter Dart API Integration PayFAST

I am trying to integrate Payfast api with my app. In WebView I can pass requested data to given https address properly but when ıt came to https request side errors occur. Simply I passed the same data to same path. What is the problem, your help is…
Muhtar
  • 1,506
  • 1
  • 8
  • 33