Skip to content

Instantly share code, notes, and snippets.

@defensive-wizard
Created September 21, 2021 07:03
Show Gist options
  • Save defensive-wizard/420c9fc34bc1e3f40766e68ec268accf to your computer and use it in GitHub Desktop.
Save defensive-wizard/420c9fc34bc1e3f40766e68ec268accf to your computer and use it in GitHub Desktop.
import 'package:http/http.dart' as http;
var client = http.Client();
try {
var uriResponse = await client.post(Uri.parse('https://example.com/whatsit/'),
var data =await client.get(uriResponse);
print(json.decode(data));
} finally {
client.close();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment