Browse Source

Fix formatting issues in docs

pull/130/head
Loïc Sharma 6 years ago
committed by Ryan Nowak
parent
commit
93615fa160
  1. 12
      docs/frontend_backend_run.md

12
docs/frontend_backend_run.md

@ -111,10 +111,10 @@ Now that we have two applications running, let's make them communicate. By defau
{
public class WeatherClient
{
private readonly JsonSerializerOptions options = new JsonSerializerOptions()
private readonly JsonSerializerOptions options = new JsonSerializerOptions()
{
PropertyNameCaseInsensitive = true,
PropertyNamingPolicy = JsonNamingPolicy. CamelCase,
PropertyNamingPolicy = JsonNamingPolicy.CamelCase,
};
private readonly HttpClient client;
@ -124,11 +124,11 @@ Now that we have two applications running, let's make them communicate. By defau
this.client = client;
}
public async Task<WeatherForecast[]> GetWeatherAsync()
public async Task<WeatherForecast[]> GetWeatherAsync()
{
var responseMessage = await this.client. GetAsync("/weatherforecast");
var stream = await responseMessage.Content. ReadAsStreamAsync();
return await JsonSerializer. DeserializeAsync<WeatherForecast[]>(stream, options);
var responseMessage = await this.client.GetAsync("/weatherforecast");
var stream = await responseMessage.Content.ReadAsStreamAsync();
return await JsonSerializer.DeserializeAsync<WeatherForecast[]>(stream, options);
}
}
}

Loading…
Cancel
Save