Execute an API call based on the method and parameters
The API method to execute
The parameters for the API call
for HTTP errors
for other errors