Public hostname should be installed in Local site's /etc/host

When I try to use an API installed on the WordPress site running in Local it will not work if that request is coming from the WordPress site running in Local. For example, if my Local site is running at “mysite.local” then a request from that WordPress site to run an API on that same site using the URL “mysite.local” will fail because “mysite.local” is not in the /etc/hosts file on the server.

Shouldn’t Local always include an entry for the public name of the server in the server’s own /etc/hosts file so that it can find itself by that name?

In this case, the server’s /etc/hosts file should including the line: mysite.local

It would be best if self-references from the server to the same server also worked for both http and https requests.