From 7bc4be52b7ec9dfe475a04e62bcb270d6d782eba Mon Sep 17 00:00:00 2001 From: minhtaile2712 Date: Fri, 19 Jul 2024 02:46:37 -0700 Subject: [PATCH] Correct methods name --- docs/versioned_docs/version-v111/intro.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/versioned_docs/version-v111/intro.md b/docs/versioned_docs/version-v111/intro.md index 1aa03999c..6d8d61664 100644 --- a/docs/versioned_docs/version-v111/intro.md +++ b/docs/versioned_docs/version-v111/intro.md @@ -63,7 +63,7 @@ var timeline = await client.GetAsync(request, cancellationToken); Both snippets above use the `GetAsync` extension, which is a wrapper about `ExecuteGetAsync`, which, in turn, is a wrapper around `ExecuteAsync`. All `ExecuteAsync` overloads and return the `RestResponse` or `RestResponse`. -The most important difference is that async methods named after HTTP methods (like `GetAsync` or `PostAsync`) return `Task` instead of `Task>`. It means that you won't get an error response if the request fails as those methods throw an exception for unsuccessful HTTP calls. For keeping the API consistent, non-generic functions like `GetAsync` or `PostAsync` also throw an exception if the request fails, although they return the `Task`. +The most important difference is that async methods named after HTTP methods (like `GetAsync` or `PostAsync`) return `Task` instead of `Task>`. It means that you won't get an error response if the request fails as those methods throw an exception for unsuccessful HTTP calls. For keeping the API consistent, non-generic functions like `GetAsync` or `PostAsync` also throw an exception if the request fails, although they return the `Task`. Read [here](advanced/error-handling.md) about how RestSharp handles exceptions.