Switched to using UriBuilder instead of manually constructing the request URIs.