Browse Source

Fix formatting issues in docs

davidfowl/dependencies
Loïc Sharma 7 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 public class WeatherClient
{ {
private readonly JsonSerializerOptions options = new JsonSerializerOptions() private readonly JsonSerializerOptions options = new JsonSerializerOptions()
{ {
PropertyNameCaseInsensitive = true, PropertyNameCaseInsensitive = true,
PropertyNamingPolicy = JsonNamingPolicy. CamelCase, PropertyNamingPolicy = JsonNamingPolicy.CamelCase,
}; };
private readonly HttpClient client; 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; this.client = client;
} }
public async Task<WeatherForecast[]> GetWeatherAsync() public async Task<WeatherForecast[]> GetWeatherAsync()
{ {
var responseMessage = await this.client. GetAsync("/weatherforecast"); var responseMessage = await this.client.GetAsync("/weatherforecast");
var stream = await responseMessage.Content. ReadAsStreamAsync(); var stream = await responseMessage.Content.ReadAsStreamAsync();
return await JsonSerializer. DeserializeAsync<WeatherForecast[]>(stream, options); return await JsonSerializer.DeserializeAsync<WeatherForecast[]>(stream, options);
} }
} }
} }

Loading…
Cancel
Save