I am trying to get the URL of the following get request;
String url = ['url_here'];
Future<Post> fetchPost() async {
final response = await http.get(url);
if (response.statusCode == 200) {
return Post.fromJson(json.decode(response.body));
} else {
throw Exception('Failed to load post');
}
}
I get a statuscode of 200.
Any ideas?
To clarify, When you enter the url in a browser it brings me to a page with a url that has a code in it. I am trying to extract that code.
dart:ioor frompackage:http?