You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/versioned_docs/version-v111/intro.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -63,7 +63,7 @@ var timeline = await client.GetAsync<HomeTimeline>(request, cancellationToken);
63
63
Both snippets above use the `GetAsync` extension, which is a wrapper about `ExecuteGetAsync`, which, in turn, is a wrapper around `ExecuteAsync`.
64
64
All `ExecuteAsync` overloads and return the `RestResponse` or `RestResponse<T>`.
65
65
66
-
The most important difference is that async methods named after HTTP methods (like `GetAsync` or `PostAsync`) return `Task<T>` instead of `Task<RestResponse<T>>`. 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<RestResponse>`.
66
+
The most important difference is that async methods named after HTTP methods (like `GetAsync<T>` or `PostAsync<T>`) return `Task<T>` instead of `Task<RestResponse<T>>`. 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<RestResponse>`.
67
67
68
68
Read [here](advanced/error-handling.md) about how RestSharp handles exceptions.
0 commit comments