flutter http
dependencies:
http: ^0.12.0+4
flutter http
dependencies:
http: ^0.12.0+4
flutter http
dependencies:
http:^0.12.2
import 'package:http/http.dart';
how to perform get request in flutter
import 'package:http/http.dart' as http;
import 'dart:convert';
class API
{
//replace with your endpoint
static String BASE_URL = 'https://some-url/api/';
static Future<List<ExampleData>> getRequest() async {
Response res = await http.get(BASE_URL+'example');
if (res.statusCode == 200) {
List<dynamic> body = jsonDecode(res.body);
// complete by parsing the json body return into ExampleData object and return
//.................
}
}
}
http package flutter
dependencies:
http: ^0.12.1
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us