RestSharp: Does Not work with Windows 10 Version 10.0.17763.1

Expected Behavior

Actual Behavior

Error: Operation is not supported on this platform. in response variable.

Steps to Reproduce the Problem

var request = new RestRequest(“getserver/data1”) { OnBeforeDeserialization = resp => { resp.ContentType = “application/json”; } };

            IRestResponse<string> response = await _client.ExecuteGetTaskAsync<string>(request, _cancellationTokenSource.Token);

Specifications

  • Version: 106.4.2
  • Platform: Windows 10 Version 10.0.17763.1 UWP Program.
  • Subsystem: 64bit

StackTrace

{System.PlatformNotSupportedException: Operation is not supported on this platform. at System.Net.SystemWebProxy.GetProxy(Uri destination) at System.Net.ServicePointManager.ProxyAddressIfNecessary(Uri& address, IWebProxy proxy) at System.Net.ServicePointManager.FindServicePoint(Uri address, IWebProxy proxy) at System.Net.HttpWebRequest.get_ServicePoint() at RestSharp.Http.ConfigureWebRequest(String method, Uri url) at RestSharp.Http.ConfigureAsyncWebRequest(String method, Uri url) at RestSharp.Http.GetStyleMethodInternalAsync(String method, Action`1 callback)}

V106.4.2 for UWP Does not work with previous version of Windows 10 either, RestSharp V106.3.1 does work with previous version of Windows 10, but does not work with Version 10.0.17763.1

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Reactions: 1
  • Comments: 42 (24 by maintainers)

Most upvoted comments

WINDOWS_APP won’t work since these are compiler directive, not run-time directives. However, we could put a condition on the call itself for Windows.

Looks the same

StackTrace = " at System.Net.SystemWebProxy.GetProxy(Uri destination)\r\n at System.Net.ServicePointManager.ProxyAddressIfNecessary(Uri& address, IWebProxy proxy)\r\n at System.Net.ServicePointManager.FindServicePoint(Uri address, IWebProxy proxy)\r\n at System…

at System.Net.SystemWebProxy.GetProxy(Uri destination) at System.Net.ServicePointManager.ProxyAddressIfNecessary(Uri& address, IWebProxy proxy) at System.Net.ServicePointManager.FindServicePoint(Uri address, IWebProxy proxy) at System.Net.HttpWebRequest.get_ServicePoint() at RestSharp.Http.ConfigureWebRequest(String method, Uri url) at RestSharp.Http.ConfigureAsyncWebRequest(String method, Uri url) at RestSharp.Http.GetStyleMethodInternalAsync(String method, Action`1 callback)