Update middleware.md package necessary to the extension method Configure (#24259)

pull/24257/head
Mohamed Amine HAMDI 2021-12-10 17:35:10 +01:00 committed by GitHub
parent 90836b5c4b
commit 948cb47f23
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 9 deletions

View File

@ -31,17 +31,10 @@ In the test project, create a test:
* Build and start a host that uses <xref:Microsoft.AspNetCore.TestHost.TestServer>.
* Add any required services that the middleware uses.
* Add the [Microsoft.AspNetCore.TestHost](https://www.nuget.org/packages/Microsoft.AspNetCore.TestHost/) NuGet package to the project:
```dotnetcli
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.TestHost" Version="3.1.*" />
</ItemGroup>
```
* Add a package reference to the project for the [`Microsoft.AspNetCore.TestHost`](https://www.nuget.org/packages/Microsoft.AspNetCore.TestHost/) NuGet package.
* Configure the processing pipeline to use the middleware for the test.
[!code-csharp[](middleware/samples_snapshot/3.x/setup.cs?highlight=4-18)]
[!code-csharp[](middleware/samples_snapshot/3.x/setup.cs?highlight=4-18)]
## Send requests with HttpClient