Skip to content

Instantly share code, notes, and snippets.

@marcossevilla
Created April 17, 2021 20:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save marcossevilla/ccc76fb1433b75cfc7fc5b1900804d8b to your computer and use it in GitHub Desktop.
Save marcossevilla/ccc76fb1433b75cfc7fc5b1900804d8b to your computer and use it in GitHub Desktop.
import 'package:dio/dio.dart';
void main() async {
final url = 'https://jsonplaceholder.typicode.com/todos/1';
final response = await Dio().get(url);
print('Response statusCode: ${response.statusCode}');
print('Response body: ${response.data}');
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment