Skip to content

Commit 12bcc93

Browse files
committed
Documentation
1 parent c40d592 commit 12bcc93

2 files changed

Lines changed: 16 additions & 0 deletions

File tree

LessAnnoyingHttp/Http.cs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@ public static async Task<Response> GetAsync(string endpoint, Header[]? headers =
3939
return new Response { IsSuccessful = response.IsSuccessStatusCode, Body = response.Content.ReadAsStringAsync().Result, Headers = new Dictionary<string, IEnumerable<string>>(response.Headers.ToDictionary(), StringComparer.OrdinalIgnoreCase), StatusCode = response.StatusCode };
4040
}
4141

42+
/// <summary>
43+
/// Synchronous version of <see cref="GetAsync"/>
44+
/// </summary>
4245
public static Response Get(string endpoint, Header[]? headers = null) => GetAsync(endpoint, headers).GetAwaiter().GetResult();
4346

4447
private static async Task<Response> BodyRequest(string endpoint, HttpMethod method, string body, Header[]? headers, string contentType) {
@@ -76,6 +79,9 @@ private static async Task<Response> BodyRequest(string endpoint, HttpMethod meth
7679
/// <returns><see cref="Response"/></returns>
7780
public static async Task<Response> DeleteAsync(string endpoint, string body, Header[]? headers = null, string contentType = "application/json") => await BodyRequest(endpoint, HttpMethod.Delete, body, headers, contentType);
7881

82+
/// <summary>
83+
/// Synchronous version of <see cref="DeleteAsync"/>
84+
/// </summary>
7985
public static Response Delete(string endpoint, string body, Header[]? headers = null, string contentType = "application/json") => DeleteAsync(endpoint, body, headers, contentType).GetAwaiter().GetResult();
8086

8187
/// <summary>
@@ -88,6 +94,9 @@ private static async Task<Response> BodyRequest(string endpoint, HttpMethod meth
8894
/// <returns><see cref="Response"/></returns>
8995
public static async Task<Response> PatchAsync(string endpoint, string body, Header[]? headers = null, string contentType = "application/json") => await BodyRequest(endpoint, HttpMethod.Patch, body, headers, contentType);
9096

97+
/// <summary>
98+
/// Synchronous version of <see cref="PatchAsync"/>
99+
/// </summary>
91100
public static Response Patch(string endpoint, string body, Header[]? headers = null, string contentType = "application/json") => PatchAsync(endpoint, body, headers, contentType).GetAwaiter().GetResult();
92101

93102
/// <summary>
@@ -100,6 +109,9 @@ private static async Task<Response> BodyRequest(string endpoint, HttpMethod meth
100109
/// <returns><see cref="Response"/></returns>
101110
public static async Task<Response> PostAsync(string endpoint, string body, Header[]? headers = null, string contentType = "application/json") => await BodyRequest(endpoint, HttpMethod.Post, body, headers, contentType);
102111

112+
/// <summary>
113+
/// Synchronous version of <see cref="PostAsync"/>
114+
/// </summary>
103115
public static Response Post(string endpoint, string body, Header[]? headers = null, string contentType = "application/json") => PostAsync(endpoint, body, headers, contentType).GetAwaiter().GetResult();
104116

105117
/// <summary>
@@ -112,5 +124,8 @@ private static async Task<Response> BodyRequest(string endpoint, HttpMethod meth
112124
/// <returns><see cref="Response"/></returns>
113125
public static async Task<Response> PutAsync(string endpoint, string body, Header[]? headers = null, string contentType = "application/json") => await BodyRequest(endpoint, HttpMethod.Put, body, headers, contentType);
114126

127+
/// <summary>
128+
/// Synchronous version of <see cref="PutAsync"/>
129+
/// </summary>
115130
public static Response Put(string endpoint, string body, Header[]? headers = null, string contentType = "application/json") => PutAsync(endpoint, body, headers, contentType).GetAwaiter().GetResult();
116131
}

LessAnnoyingHttp/LessAnnoyingHttp.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
<Nullable>enable</Nullable>
1616
<Title>LessAnnoyingHttp</Title>
1717
<Copyright>Copyright (c) 2026 DemonExposer</Copyright>
18+
<GenerateDocumentationFile>true</GenerateDocumentationFile>
1819
</PropertyGroup>
1920

2021
<ItemGroup>

0 commit comments

Comments
 (0)