Problem solved!
What I had to do was set the proxy of the AsyncHttpClient
, using setProxy()
, before making the request. I set the proxy address to the local IP address of my laptop running the web server.
client.setProxy("192.168.43.16", 80);
Now it seems to be working as expected.