diff --git a/HttpClientStudy.Core/SimpleHttpClient.cs b/HttpClientStudy.Core/SimpleHttpClient.cs index 30336fd..d7c33d6 100644 --- a/HttpClientStudy.Core/SimpleHttpClient.cs +++ b/HttpClientStudy.Core/SimpleHttpClient.cs @@ -11,6 +11,7 @@ namespace HttpClientStudy.Core /// public class SimpleHttpClient { + #region Get请求 public string Get(string url) { HttpClient client = new HttpClient(); @@ -31,7 +32,7 @@ namespace HttpClientStudy.Core response.EnsureSuccessStatusCode(); //或者 if (response.IsSuccessStatusCode) - { + { //业务逻辑 } @@ -42,8 +43,8 @@ namespace HttpClientStudy.Core } //请求头 - if(response is { Headers.ETag:null}) - { + if (response is { Headers.ETag: null }) + { //业务逻辑 } @@ -98,5 +99,6 @@ namespace HttpClientStudy.Core return result; } + #endregion } }