Skip to main content

Definition

Assembly: System.Net.Http.dll Namespace: System.Net.Http

Syntax

Summary

This type is defined in System.Net.Http.

Remarks

See Microsoft documentation for more information about the rest of the API.

Methods

ExecuteTestRequest Extension

Extension method from System.Net.Http.Breakdance_WebApi_HttpClientExtensions
Creates an HttpRequestMessage for the given configuration and executes it asynchronously through the HttpClient.

Syntax

Parameters

Returns

Type: System.Threading.Tasks.Task<System.Net.Http.HttpResponseMessage> An HttpResponseMessage containing the results of the attempted request.

Examples

This sample shows the simplest way to create a testable HttpClient and execute a test request, using MSTest and FluentAssertions.