Fixed port being ignored when building the URL

Request URL was being build without regard to port, this pull request fixes it.