Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
import 'dart:async';
import 'package:http/http.dart' as http;
Future makeRequest(String url) => http.get(url)
.then((res) => res.body);
void main() {
.then((value) => print(value))
.catchError((e) => print(e.toString()));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.