diff options
author | Rory& <root@rory.gay> | 2024-08-09 21:12:11 +0200 |
---|---|---|
committer | Rory& <root@rory.gay> | 2024-08-09 21:12:11 +0200 |
commit | a2d4a4a82d849c5f6b0b34a97b35927db96bdef2 (patch) | |
tree | 745218b6107fd117a0187f3e23d907dcdce1737c /LibMatrix/Extensions/MatrixHttpClient.Single.cs | |
parent | More synapse admin apis (diff) | |
download | LibMatrix-a2d4a4a82d849c5f6b0b34a97b35927db96bdef2.tar.xz |
Minor cleanup
Diffstat (limited to 'LibMatrix/Extensions/MatrixHttpClient.Single.cs')
-rw-r--r-- | LibMatrix/Extensions/MatrixHttpClient.Single.cs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/LibMatrix/Extensions/MatrixHttpClient.Single.cs b/LibMatrix/Extensions/MatrixHttpClient.Single.cs index bab3e92..a5e94e5 100644 --- a/LibMatrix/Extensions/MatrixHttpClient.Single.cs +++ b/LibMatrix/Extensions/MatrixHttpClient.Single.cs @@ -59,7 +59,7 @@ public class MatrixHttpClient { typeof(HttpRequestHeaders).GetConstructor(BindingFlags.NonPublic | BindingFlags.Instance, null, [], null)?.Invoke([]) as HttpRequestHeaders ?? throw new InvalidOperationException("Failed to create HttpRequestHeaders"); - private JsonSerializerOptions GetJsonSerializerOptions(JsonSerializerOptions? options = null) { + private static JsonSerializerOptions GetJsonSerializerOptions(JsonSerializerOptions? options = null) { options ??= new JsonSerializerOptions(); options.Converters.Add(new JsonFloatStringConverter()); options.Converters.Add(new JsonDoubleStringConverter()); @@ -224,7 +224,7 @@ public class MatrixHttpClient { await foreach (var resp in result) yield return resp; } - public async Task<bool> CheckSuccessStatus(string url) { + public static async Task<bool> CheckSuccessStatus(string url) { //cors causes failure, try to catch try { var resp = await Client.GetAsync(url); |