Skip to content

Commit f4b2350

Browse files
authored
Update managed-identity-based-authentication.md
There exists no ReadAsAsync method on an HttpContent. Rather, this should use the extension method ReadFromJsonAsync in order to pass in a type and read the result.
1 parent 3992e13 commit f4b2350

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

articles/cosmos-db/managed-identity-based-authentication.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ namespace Monitor
182182
var result = await httpClient.PostAsync(endpoint, new StringContent(""));
183183

184184
// Get the result back as a DatabaseAccountListKeysResult.
185-
DatabaseAccountListKeysResult keys = await result.Content.ReadAsAsync<DatabaseAccountListKeysResult>();
185+
DatabaseAccountListKeysResult keys = await result.Content.ReadFromJsonAsync<DatabaseAccountListKeysResult>();
186186

187187
log.LogInformation("Starting to create the client");
188188

0 commit comments

Comments
 (0)