From 924b9871566f7ba657475c674e196aa0629870cc Mon Sep 17 00:00:00 2001 From: Argo-2016 Date: Tue, 31 Dec 2019 12:18:40 +0800 Subject: [PATCH] =?UTF-8?q?test:=20=E5=88=A0=E9=99=A4=E6=B3=A8=E9=87=8A?= =?UTF-8?q?=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Bootstrap.Admin/HttpClientExtensions.cs | 96 ------------------- 1 file changed, 96 deletions(-) diff --git a/test/UnitTest/Bootstrap.Admin/HttpClientExtensions.cs b/test/UnitTest/Bootstrap.Admin/HttpClientExtensions.cs index 9ca0f761..6bfaf769 100644 --- a/test/UnitTest/Bootstrap.Admin/HttpClientExtensions.cs +++ b/test/UnitTest/Bootstrap.Admin/HttpClientExtensions.cs @@ -8,102 +8,6 @@ namespace Bootstrap.Admin /// public static class HttpClientExtensions { - ///// - ///// GetJson 异步方法 - ///// - ///// - ///// - ///// - ///// - //public static async Task GetAsJsonAsync(this HttpClient client, string requestUri = null) - //{ - // var resp = await client.GetAsync(requestUri); - // var json = await resp.Content.ReadAsStringAsync(); - // return JsonSerializer.Deserialize(json, new JsonSerializerOptions().AddDefaultConverters()); - //} - - ///// - ///// PostJson 异步方法 - ///// - ///// - ///// - ///// - ///// - ///// - ///// - //public static async Task PostAsJsonAsync(this HttpClient client, string requestUri, TValue t) - //{ - // var resp = await client.PostAsJsonAsync(requestUri, t); - // var json = await resp.Content.ReadAsStringAsync(); - // return JsonSerializer.Deserialize(json, new JsonSerializerOptions().AddDefaultConverters()); - //} - - ///// - ///// PostJson 异步方法 - ///// - ///// - ///// - ///// - ///// - ///// - //public static async Task PostAsJsonAsync(this HttpClient client, TValue t) => await PostAsJsonAsync(client, string.Empty, t); - - ///// - ///// DeleteJson 异步方法 - ///// - ///// - ///// - ///// - ///// - ///// - ///// - //public static async Task DeleteAsJsonAsync(this HttpClient client, string requestUri, TValue t) - //{ - // var req = new HttpRequestMessage(HttpMethod.Delete, requestUri); - // req.Content = new StringContent(JsonSerializer.Serialize(t)); - // req.Content.Headers.ContentType = new MediaTypeHeaderValue("application/json"); - - // var resp = await client.SendAsync(req); - // var json = await resp.Content.ReadAsStringAsync(); - // return JsonSerializer.Deserialize(json, new JsonSerializerOptions().AddDefaultConverters()); - //} - - ///// - ///// DeleteJson 异步方法 - ///// - ///// - ///// - ///// - ///// - ///// - //public static async Task DeleteAsJsonAsync(this HttpClient client, TValue t) => await DeleteAsJsonAsync(client, string.Empty, t); - - ///// - ///// PutJson 异步方法 - ///// - ///// - ///// - ///// - ///// - ///// - ///// - //public static async Task PutAsJsonAsync(this HttpClient client, string requestUri, TValue t) - //{ - // var resp = await client.PutAsJsonAsync(requestUri, t); - // var json = await resp.Content.ReadAsStringAsync(); - // return JsonSerializer.Deserialize(json, new JsonSerializerOptions().AddDefaultConverters()); - //} - - ///// - ///// PutJson 异步方法 - ///// - ///// - ///// - ///// - ///// - ///// - //public static async Task PutAsJsonAsync(this HttpClient client, TValue t) => await PutAsJsonAsync(client, string.Empty, t); - /// /// LoginAsync 异步方法 ///