Strip trailing slashes in $api_host before curling.