Skip to content
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

Possibly remove the cors proxy #165

Open
Rytisgit opened this issue Feb 13, 2023 · 0 comments
Open

Possibly remove the cors proxy #165

Rytisgit opened this issue Feb 13, 2023 · 0 comments

Comments

@Rytisgit
Copy link
Owner

https://nuget.info/packages/Uno.Wasm.HttpRequestMessageExtensions/8.0.0-dev.92

In the csproj:

xml<PackageReference Include="Uno.Wasm.HttpRequestMessageExtensions" Version="8.0.0-dev.77" />
using Uno.WebAssembly.Net.Http; 
var request = new HttpRequestMessage(HttpMethod.Get, "[http://www.google.com/complete/search?output=toolbar&q={0}&hl=en/](http://www.google.com/complete/search?output=toolbar&q=%7b0%7d&hl=en/)");
request.SetBrowserRequestMode(BrowserRequestMode.NoCors);
request.SetBrowserRequestCache(BrowserRequestCache.NoStore); 
//optional
using (var httpClient = new HttpClient()){   
 var response = await httpClient.SendAsync(request); 
   var content = await response.Content.ReadAsStringAsync();
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant