Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR DART

Send HTTP Get request in Flutter or Dart

import 'dart:convert';
import 'package:http/http.dart' as http;

void main {
    final response = await http.get(Uri.parse("https://domain.com/endpoint?data=hello"));

    String responseData = utf8.decode(response.bodyBytes);

    print(json.decode(responseData));
}
Source by devsheet.com #
 
PREVIOUS NEXT
Tagged: #Send #HTTP #Get #request #Flutter #Dart
ADD COMMENT
Topic
Name
3+6 =