I'm trying to do this simple http request, and I always get this error, I have already tried with dio package too.
The rest api is from a client, but I have tried the same request by the postman and it works. The code:
try {
dynamic response = await http.post(
"https://api/signup",
headers: <String, String>{
'Content-Type': 'application/json; charset=UTF-8',
},
body: jsonEncode({}),
);
return response;
} catch (e) {
print(e);
}
The flutter doctor.
[√] Flutter (Channel stable, 1.22.4, on Microsoft Windows [versão 10.0.19041.630], locale pt-BR)
[√] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
[!] Android Studio (version 3.4)
X Dart plugin not installed; this adds Dart specific functionality.
X Unable to determine bundled Java version.
[!] Android Studio (version 4.1.0)
X Flutter plugin not installed; this adds Flutter specific functionality.
X Dart plugin not installed; this adds Dart specific functionality.
[√] VS Code, 64-bit edition (version 1.51.1)
[!] Connected device
! No devices available
! Doctor found issues in 3 categories.