Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions Content/Functions/Azure Functions HOL (C#).md
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,10 @@ Once you have created an Azure Function App, you can add Azure Functions to it.

var endpoint = ConfigurationManager.AppSettings["VisionEndpoint"];
var results = await client.PostAsync(endpoint + "/analyze?visualFeatures=Adult", payload);
if (!results.IsSuccessStatusCode) {
throw new Exception(String.Format("Vision API request failed with status {0}, response: {1}",
results.StatusCode, await results.Content.ReadAsStringAsync()));
}
var result = await results.Content.ReadAsAsync<ImageAnalysisInfo>();
return result;
}
Expand Down