Commit b117da03 authored by Dmitry Anshilevich's avatar Dmitry Anshilevich Committed by Lemon

README.md: fix HttpClientFactory example (#28)

* README.md: fix HttpClientFactory example

* Update README.md
parent adcf1135
......@@ -67,10 +67,10 @@ public void ConfigureServices(IServiceCollection services)
public class ValuesController : Controller
{
[HttpGet("{id}")]
public async Task<string> Get(int id, [FromServices] IHttpClientFactory httpClientFactory)
public Task<string> Get(int id, [FromServices] IHttpClientFactory httpClientFactory)
{
var httpClient = httpClientFactory.CreateClient("sw-tracing");
return await httpClient.GetStringAsync("http://api.xxx.com/values");
return httpClient.GetStringAsync("http://api.xxx.com/values");
}
}
```
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment