Http(s) API call with custom local domain (valet)

Just for anyone else who wants to test modifying the /etc/hosts file:

##
# Host Database
#
# localhost is used to configure the loopback interface
# when the system is booting.  Do not change this entry.
##
127.0.0.1	localhost
255.255.255.255	broadcasthost
::1             localhost

# Adding this last line for an example domain 315.test solved it for me
127.0.0.1 325.test

(Haven’t tested with HTTPS, though)