So this is the curl I use for testing:
curl http://MYIP:5000/register -H 'Content-Type: application/json' -d '{"username": "test","password": "test","email":"test@test.test","passwordAgain": "test"}'
And this is the code from the app:
String url = "http://MYIP:5000/register";
var response = await http.post(Uri.parse(url), body: {
"username": "test",
"password": "test",
"email": "test@test.test",
"passwordAgain": "test"}
);
The curl request is working, the app code says something is wrong (400 Bad Request).