Fix GetEndpoint to work with httr