All Questions
15 questions
1
vote
0
answers
70
views
iOS cupertino_http error: Unhandled Exception: Invalid argument(s): Couldn't resolve native function '_wrapListenerBlock_1a6kixf'
I am trying to run the sample app given with cupertino_http package in iOS. But I am getting below error.
flutter: The Dart VM service is listening on http://127.0.0.1:53003/tmg2xds8gus=/
[ERROR:...
0
votes
2
answers
542
views
Flutter web app encounters error when sending GET request with body
I'm currently developing a Flutter web application where I've encountered an issue specifically when attempting to send a GET request with a body. The application works as expected on Chrome, but ...
1
vote
0
answers
329
views
Flutter http: No route to host when trying to send a request to localhost:5000
I am trying to use a Flutter app running on a device (and debugging via Android Studio) to make a simple GET request to my localhost:5000. The response should be the result of a stored procedure being ...
0
votes
2
answers
69
views
Flutter Login type 'int' is not a subtype of type 'String'
This is my file user_model.dart
class UserModel {
int id, nik;
String password, token;
UserModel(
{required this.id,
required this.nik,
required this.password,
required ...
0
votes
1
answer
212
views
Http package refused connection on mobile network many time but on wifi works fine after updating http package
My whole team face this problem in our retailer app API works slowly on mobile network but on Wi-Fi works superb. It is not API problem http package have some kind of issue. please help to rectify ...
0
votes
1
answer
485
views
SOLVED - How to add a condition when the http response of given URL is err -1 or 7 in Flutter (getting an error getting images)
I'm creating a flutter news app, using this API https://newsapi.org/docs/endpoints/top-headlines
Everything runs well when I select the 'us' country to fetch the news, but, when I switch to 've' (...
1
vote
2
answers
1k
views
Flutter http request issue
I'm trying to check an url with the http package.
The code looks like this:
Future<void> checkURl() async{
final response =
await http.get(
Uri.parse('https://someurl.com'))...
0
votes
1
answer
576
views
Why http.post() response body is not fully printed? Does it related to NoSuchMethodError?
I'm using IGDB API to list the games. I'm getting this console output from print(queryResponse.body); which has missing data compared to Postman's response body.
Console:
I/flutter (16534): [
I/...
1
vote
2
answers
2k
views
How to pass an image as parameter to a key in a post request Flutter?
The request body is a form-data. The request body has a key, image that expects a file (image file here). This is what I've done so far:
final response = await http.MultipartRequest(
'POST', Uri....
0
votes
1
answer
243
views
Dart (flutter): Http requests seem not to execute
I'm trying to make a simple HTTP-head request within a Future. However, for some reason, the request is not executed. This is my current code:
Future<int> logIn({
required String username,
...
0
votes
1
answer
120
views
After posting backend responding a token . Now how will get that that token? flutter http request
After log in backend responding a token. Now how will get that that token?
I used HTTP package for this project. I am new to flutter. my code example:
Future<void> login() async {
if (...
2
votes
1
answer
3k
views
unhandled Exception: SocketException: Failed host lookup: URL (OS Error: No address associated with hostname, errno = 7)
EDIT: Question is now Solved
I tried the solution over here but it didn't work out for me.
cases
I have provided internet permissions
I am running it on the actual device
there is an active internet ...
1
vote
1
answer
3k
views
if i make an API call it returns me with HTML code in flutter
I am using HTTP package for making API requests but when I make a request it returns me with Html response.
import 'package:clima/services/location.dart';
import 'package:flutter/material.dart';
...
0
votes
0
answers
419
views
How can I make an http POST request from dart with authentication?
I'm trying to do a post, to create a user, but in a simple way. I do need to use authentication, so I'm passing the token in the header, as I would do in the GET request. But I'm not sure why I'm ...
0
votes
2
answers
562
views
http Dart package examples are outdated, how to use client.get()
Here's the second example given by the http package: https://pub.dev/packages/http
var client = http.Client();
try {
var uriResponse = await client.post('https://example.com/whatsit/create',
...