How use call a local server by name rather than IP? I've started MAMP on my computer and I'd like to make a GET call from Android app. I'd like to access the computer by it's name(e.g. computer.local:8888) rather than the computer's ip.

On the computer if I open Chrome and type computer.local:8888 it works as expected. On the phone this fails, but typing it's local ip (192.168.1.141) works. 

So, is it possible to access a local http server by a name rather than ip ?
If so, how ?
Go to Settings&rarr;Network, tap WiFi, and watch out for your WiFi AP here. Tap it, select to edit it. Toggle the "advanced settings" to be shown.

By default, WiFi is configured via DHCP -- but for some reason unknown to me (and escaping my understanding), Android doesn't pick the name servers via DHCP, and instead sticks to Google's hardcoded ones (e.g. 8.8.8.8). So in this place, you need to switch to a static IP, set the default gateway correspondingly, and put your own name server's address (most likely again your router's IP) into the field for DNS1.

Save the changes, and you should be able to use your local hostnames. You could even try switching back to DHCP, and see whether it keeps your DNS1 settings.

To calm down upcoming worries: This only affects the WiFi AP you edited, no system-wide changes for all WiFi APs. In the worst case, you always can delete the AP and re-create it.