Skip to content

Commit

Permalink
Run preparation methods on all HttpClient.Send() overloads (#414)
Browse files Browse the repository at this point in the history
  • Loading branch information
patagonaa authored Apr 3, 2024
1 parent e65c21f commit be8176e
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion nanoFramework.System.Net.Http/Http/HttpClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ namespace System.Net.Http
/// In addition, every HttpClient instance uses its own connection pool,
/// isolating its requests from requests executed by other HttpClient instances.
///
/// HttpClient is intended to be instantiated once and reused throughout the life of an application.
/// HttpClient is intended to be instantiated once and reused throughout the life of an application.
/// </remarks>
public partial class HttpClient : HttpMessageInvoker
{
Expand Down Expand Up @@ -352,6 +352,19 @@ public string GetString(string requestUri)

#region Advanced Send Overloads

/// <summary>
/// Sends an HTTP request with the specified request.
/// </summary>
/// <param name="request">The HTTP request message to send.</param>
/// <returns>The HTTP response message.</returns>
/// <exception cref="ArgumentNullException">The request is <see langword="null"/>.</exception>
/// <exception cref="InvalidOperationException">The request message was already sent by the <see cref="HttpClient"/> instance.</exception>
/// <exception cref="HttpRequestException">The request failed due to an underlying issue such as network connectivity, DNS failure, or server certificate validation.</exception>
public override HttpResponseMessage Send(HttpRequestMessage request)
{
return Send(request, DefaultCompletionOption);
}

/// <summary>
/// Sends an HTTP request with the specified request.
/// </summary>
Expand Down

0 comments on commit be8176e

Please sign in to comment.