part of code
Future getData() async {
var url = Uri.parse("https://10.0.2.2:8000/drop/");
var res = await http.get(url);
var resb = jsonDecode(res.body);
return (resb);
maybe its a http
, https
problem
did you try it like this without parsing the url ?
Future getData() async {
var res = await http.get("https://10.0.2.2:8000/drop/");
var resb = jsonDecode(res.body);
return (resb);
or like this :
Future getData() async {
var url = Uri.tryParse("https://10.0.2.2:8000/drop/");
var res = await http.get(url);
var resb = jsonDecode(res.body);
return (resb);
also this happens when an HTTPS
client reaches an HTTP
endpoint