Open AhmedKhalil777 opened 3 years ago
Try the library option for httpclient. Post here if it doesnt work. Ive been trying to rewrite the http client but i need my nrt pull request merged first.
I tried to use it but same error,,
npx @openapitools/openapi-generator-cli generate -i {{url}} -g csharp-netcore -o {{OutPut path}} --additional-properties=library=httpclient
Microsoft.AspNetCore.Components.WebAssembly.Rendering.WebAssemblyRenderer[100]
Unhandled exception rendering component: System.Net.Requests is not supported on this platform.
System.PlatformNotSupportedException: System.Net.Requests is not supported on this platform.
at System.Net.WebRequest.get_DefaultWebProxy()
at RestSharp.RestClient.ConfigureHttp(IRestRequest request)
at RestSharp.RestClient.ExecuteAsync(IRestRequest request, Action2 callback, String httpMethod, Func
4 getWebRequest)
at RestSharp.RestClient.ExecuteAsync(IRestRequest request, Action2 callback, Method httpMethod) at RestSharp.RestClient.ExecuteAsync(IRestRequest request, Action
2 callback)
at RestSharp.RestClient.ExecuteAsync[CourseDTOPaginatedList](IRestRequest request, Action`2 callback)
at RestSharp.R
I dont think youre passing in the library option for httpclient.
Try to support Blazor WASM with generators
System.Net.Requests is not supported on this platform. System.PlatformNotSupportedException System.Net.Requests is not supported on this platform. at System.Net.WebRequest.get_DefaultWebProxy() at RestSharp.RestClient.ConfigureHttp(IRestRequest request) at RestSharp.RestClient.ExecuteAsync(IRestRequest request, Action
2 callback, String httpMethod, Func
4 getWebRequest) at RestSharp.RestClient.ExecuteAsync(IRestRequest request, Action2 callback, Method httpMethod) at RestSharp.RestClient.ExecuteAsync(IRestRequest request, Action
2 callback) at RestSharp.RestClient.ExecuteAsync[CourseDTOPaginatedList](IRestRequest request, Action`2 callback) at RestSharp.RestClient.ExecuteAsync[CourseDTOPaginatedList](IRestRequest request, CancellationToken cancellationToken) --- End of stack trace from previous location ---