-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Added back all missing Async API functions #1800
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need it here, or can it be an extension?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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).