HttpResponse.Exception
property · HttpResponse · cAlgo.API
DesktopCLICloud
Gets the exception thrown when sending HTTP request.
Definition
public HttpException Exception {get;}
httpResponse.Exception: HttpException
Returns HttpException
Examples
var response = Http.Get("https://api.example.com/quotes/EURUSD");
if (response.Exception != null)
Print("Request error: {0}", response.Exception.Message);
response = api.Http.Get("https://api.example.com/quotes/EURUSD")
if response.Exception is not None:
api.Print(f"Request error: {response.Exception.Message}")