Repository navigation
Added back all missing Async API functions - #1800
Conversation
… via async not sure how to convert that one).
| /// Executes the request synchronously, authenticating if needed | ||
| /// </summary> | ||
| /// <param name="request">Request to be executed</param> | ||
| public RestResponse Execute(RestRequest request) => AsyncHelpers.RunSync(() => ExecuteAsync(request)); |
There was a problem hiding this comment.
Do we need it here, or can it be an extension?
There was a problem hiding this comment.
Seems simple enough to put it there, but it could be moved to RestClientExtensions I suppose? What would you prefer?
There was a problem hiding this comment.
The question is if it should be a part of the potentially returned IRestClient interface. Do you think it makes sense to keep non-async methods as the core functionality?
There was a problem hiding this comment.
Yes, I think they should be part of the core functionality and if there was an IRestClient interface, it should include the non-async functions as well.
There was a problem hiding this comment.
There could be two interfaces, one for sync and one for non to keep it clean, but IRestClient should inherit both as many people will use both sync and async in their code.
Added back all missing Async API functions (except for json streaming via async not sure how to convert that one).