Fixed bug where API preview only worked on localhost.

Removed the host and port portion of the API requests, as they will be done on the local server.