adding the replicaset into the url, and encode url parameters