Skip to content

Commit

Permalink
Fix typo in v107 docs (#1852)
Browse files Browse the repository at this point in the history
  • Loading branch information
kappa7194 committed May 6, 2022
1 parent 271ddff commit 8ef5115
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/v107/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ Mocking an infrastructure component like RestSharp (or HttpClient) is not the be

The best way to test HTTP calls is to make some, using the actual service you call. However, you might still want to check if your API client forms requests in a certain way. You might also be sure about what the remote server responds to your calls with, so you can build a set of JSON (or XML) responses, so you can simulate remote calls.

It is perfectly doable without using interfaces. As RestSharp uses `HttpClient` internally, it certainly uses `HttpMessageHandler`. Features like delegating handlers allow you to intersect the request pipeline, inspect the request, and substitute the response. You can do it yourself, or use a library like [MockHttp](https://github.com/richardszalay/mockhttp). They have an example provided in the repository README, so we have changed it for RestClient here:
It is perfectly doable without using interfaces. As RestSharp uses `HttpClient` internally, it certainly uses `HttpMessageHandler`. Features like delegating handlers allow you to intercept the request pipeline, inspect the request, and substitute the response. You can do it yourself, or use a library like [MockHttp](https://github.com/richardszalay/mockhttp). They have an example provided in the repository README, so we have changed it for RestClient here:

```csharp
var mockHttp = new MockHttpMessageHandler();
Expand Down

0 comments on commit 8ef5115

Please sign in to comment.