GetStatusAsync();
+}
+
+internal sealed class Issue2067Response
+{
+ public Issue2067Status Status { get; set; }
+}
+
+internal enum Issue2067Status
+{
+ [System.Text.Json.Serialization.JsonStringEnumMemberName("totally-ready")]
+ TotallyReady,
+
+ NeedsReview
+}
diff --git a/examples/BlazorWasmIssue2065/Pages/Index.razor b/examples/BlazorWasmIssue2065/Pages/Index.razor
new file mode 100644
index 000000000..98b18ff7a
--- /dev/null
+++ b/examples/BlazorWasmIssue2065/Pages/Index.razor
@@ -0,0 +1,31 @@
+@page "/"
+@inject IIssue2065Api Api
+
+Issue 2065
+
+Issue 2065
+
+This sample proves Refit works inside Blazor WebAssembly without blocking sync waits.
+
+
+
+@status
+
+@code {
+ private string status = "Ready";
+
+ private async Task CallApi()
+ {
+ status = "Calling...";
+
+ try
+ {
+ var payload = await Api.GetPayload();
+ status = $"Success: {payload}";
+ }
+ catch (Exception ex)
+ {
+ status = $"Failure: {ex.GetType().Name} - {ex.Message}";
+ }
+ }
+}
diff --git a/examples/BlazorWasmIssue2065/Pages/Issue2067.razor b/examples/BlazorWasmIssue2065/Pages/Issue2067.razor
new file mode 100644
index 000000000..589b74f8c
--- /dev/null
+++ b/examples/BlazorWasmIssue2065/Pages/Issue2067.razor
@@ -0,0 +1,31 @@
+@page "/issue2067"
+@inject IIssue2067Api Api
+
+Issue 2067
+
+Issue 2067
+
+This sample proves Refit's default System.Text.Json enum converter supports JsonStringEnumMemberName.
+
+
+
+@status
+
+@code {
+ private string status = "Ready";
+
+ private async Task CallApi()
+ {
+ status = "Calling...";
+
+ try
+ {
+ var payload = await Api.GetStatusAsync();
+ status = $"Success: {payload.Status}";
+ }
+ catch (Exception ex)
+ {
+ status = $"Failure: {ex.GetType().Name} - {ex.Message}";
+ }
+ }
+}
diff --git a/examples/BlazorWasmIssue2065/Program.cs b/examples/BlazorWasmIssue2065/Program.cs
new file mode 100644
index 000000000..89c3260dc
--- /dev/null
+++ b/examples/BlazorWasmIssue2065/Program.cs
@@ -0,0 +1,29 @@
+using BlazorWasmIssue2065;
+using Microsoft.AspNetCore.Components.Web;
+using Microsoft.AspNetCore.Components.WebAssembly.Hosting;
+using Refit;
+
+var builder = WebAssemblyHostBuilder.CreateDefault(args);
+builder.RootComponents.Add("#app");
+builder.RootComponents.Add("head::after");
+
+builder.Services.AddScoped(_ => new HttpClient
+{
+ BaseAddress = new Uri(builder.HostEnvironment.BaseAddress)
+});
+
+builder.Services.AddScoped(sp =>
+ RestService.For(sp.GetRequiredService())
+);
+builder.Services.AddScoped(sp =>
+ RestService.For(
+ sp.GetRequiredService(),
+ new RefitSettings(
+ new SystemTextJsonContentSerializer(
+ SystemTextJsonContentSerializer.GetDefaultJsonSerializerOptions()
+ )
+ )
+ )
+);
+
+await builder.Build().RunAsync();
diff --git a/examples/BlazorWasmIssue2065/Shared/MainLayout.razor b/examples/BlazorWasmIssue2065/Shared/MainLayout.razor
new file mode 100644
index 000000000..dcac09d8e
--- /dev/null
+++ b/examples/BlazorWasmIssue2065/Shared/MainLayout.razor
@@ -0,0 +1,7 @@
+@inherits LayoutComponentBase
+
+
+
+ @Body
+
+
diff --git a/examples/BlazorWasmIssue2065/Shared/_Imports.razor b/examples/BlazorWasmIssue2065/Shared/_Imports.razor
new file mode 100644
index 000000000..d2616004e
--- /dev/null
+++ b/examples/BlazorWasmIssue2065/Shared/_Imports.razor
@@ -0,0 +1 @@
+@namespace BlazorWasmIssue2065.Shared
diff --git a/examples/BlazorWasmIssue2065/_Imports.razor b/examples/BlazorWasmIssue2065/_Imports.razor
new file mode 100644
index 000000000..e2dff0fd7
--- /dev/null
+++ b/examples/BlazorWasmIssue2065/_Imports.razor
@@ -0,0 +1,9 @@
+@using System.Net.Http
+@using System.Net.Http.Json
+@using Microsoft.AspNetCore.Components.Forms
+@using Microsoft.AspNetCore.Components.Routing
+@using Microsoft.AspNetCore.Components.Web
+@using Microsoft.AspNetCore.Components.Web.Virtualization
+@using Microsoft.AspNetCore.Components.WebAssembly.Http
+@using Microsoft.JSInterop
+@using BlazorWasmIssue2065
diff --git a/examples/BlazorWasmIssue2065/wwwroot/index.html b/examples/BlazorWasmIssue2065/wwwroot/index.html
new file mode 100644
index 000000000..d13941ef6
--- /dev/null
+++ b/examples/BlazorWasmIssue2065/wwwroot/index.html
@@ -0,0 +1,13 @@
+
+
+
+
+
+ BlazorWasmIssue2065
+
+
+
+ Loading...
+
+
+
diff --git a/examples/BlazorWasmIssue2065/wwwroot/sample-data/status.json b/examples/BlazorWasmIssue2065/wwwroot/sample-data/status.json
new file mode 100644
index 000000000..ce6aa6f4a
--- /dev/null
+++ b/examples/BlazorWasmIssue2065/wwwroot/sample-data/status.json
@@ -0,0 +1,3 @@
+{
+ "status": "totally-ready"
+}
diff --git a/examples/BlazorWasmIssue2065/wwwroot/sample-data/weather.json b/examples/BlazorWasmIssue2065/wwwroot/sample-data/weather.json
new file mode 100644
index 000000000..90ef3cff0
--- /dev/null
+++ b/examples/BlazorWasmIssue2065/wwwroot/sample-data/weather.json
@@ -0,0 +1 @@
+"Blazor WASM Refit call completed"
diff --git a/examples/Meow.Common/Meow.Common.csproj b/examples/Meow.Common/Meow.Common.csproj
index 2728a84b7..5b52a9bf6 100644
--- a/examples/Meow.Common/Meow.Common.csproj
+++ b/examples/Meow.Common/Meow.Common.csproj
@@ -1,10 +1,11 @@
-
+
net8.0
enable
enable
false
+ $(NoWarn);CS1591;IDE1006;CA1819;CS8618;CA1707;CA1056
diff --git a/examples/Meow/Meow.csproj b/examples/Meow/Meow.csproj
index b428fe9b2..4ee710237 100644
--- a/examples/Meow/Meow.csproj
+++ b/examples/Meow/Meow.csproj
@@ -6,6 +6,7 @@
enable
enable
false
+ $(NoWarn);CS1591