fixed the HTTP API client