rapi.client, http.client: Format url correctly when using IPv6