I am trying to send post request to a website with port configured. http://example.com:8080/. When i send the request, it show some error
http.post('example.com:8080/apps/api.php', body: {'name': 'doodle', 'color': 'blue'}).then((response) {
print(response);
});
Unhandled Exception: SocketException: Failed host lookup: 'example.com' (OS Error: No address associated with hostname, errno = 7)
The port is ignored there. Is there any way i can do to fix this? Or is there any other http library that i can use?