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
{{ message }}
This repository has been archived by the owner on Feb 22, 2023. It is now read-only.
This commit removed WebServiceRequestBase.GetResponse(), which at the time was a sync-over-async antipattern:
public TResponse GetResponse(CancellationToken cancellationToken = default(CancellationToken))
{
// wait for async, which supports timeout
return GetResponseAsync(cancellationToken).GetAwaiter().GetResult();
}
The conversation on that commit shows that if a synchronous GetReponse() method is needed then a true synchronous GetResponse() that does synchronous I/O (instead of blocking on an asynchronous call) is preferred. I'm currently writing an API client in which I would like to support synchronous web calls for legacy UI projects. If we port our former Libronix.Utility solution using HttpWebRequest here just for the synchronousGetResponse() then I can use this library, otherwise I'll have to use Libronix.Utility. HttpWebRequest has netstandard2.0 support.
The text was updated successfully, but these errors were encountered:
This commit removed
WebServiceRequestBase.GetResponse()
, which at the time was a sync-over-async antipattern:The conversation on that commit shows that if a synchronous
GetReponse()
method is needed then a true synchronousGetResponse()
that does synchronous I/O (instead of blocking on an asynchronous call) is preferred. I'm currently writing an API client in which I would like to support synchronous web calls for legacy UI projects. If we port our formerLibronix.Utility
solution usingHttpWebRequest
here just for the synchronousGetResponse()
then I can use this library, otherwise I'll have to useLibronix.Utility
.HttpWebRequest
has netstandard2.0 support.The text was updated successfully, but these errors were encountered: