-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Description
Describe the bug
In a .NET MAUI project running on iOS, creating an new instance of RestClient, throws an "Operation not supported on this platform" exception.
Android works as expected.
To Reproduce
Create new .NET MAUI project, add RestSharp nuget and create new RestClient object.
Run project on iOS configuration.
Expected behavior
Create a new instance of RestClient
Stack trace
at System.Net.Http.NSUrlSessionHandler.set_Proxy(IWebProxy value)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
--- End of stack trace from previous location ---
at System.Net.Http.HttpClientHandler.InvokeNativeHandlerMethod(String name, Object[] parameters)
at System.Net.Http.HttpClientHandler.SetProxy(IWebProxy value)
at System.Net.Http.HttpClientHandler.set_Proxy(IWebProxy value)
at RestSharp.RestClient.ConfigureHttpMessageHandler(HttpClientHandler handler)
at RestSharp.RestClient..ctor(RestClientOptions options, Action`1 configureDefaultHeaders)
at RestSharp.RestClient..ctor()
at MauiAuth0App.MauiProgram.CreateMauiApp() in /Users/vladsteer73/Work/R&D/dotnet-maui-auth0-app-main/MauiProgram.cs:line 32
Desktop (please complete the following information):
- OS: macOS
- .NET 6
- Version 6.0.400
