The code below works started giving trouble when the back-end server is switched from HTTP to HTTS.
response = await http.post( Uri.encodeFull("