"https://westeurope.api.cognitive.microsoft.com/emotion/v1.0/recognize?"; using (var content = new ByteArrayContent(myImageAsByteArray)) { content.Headers.ContentType = new MediaTypeHeaderValue("application/octet-stream"); var response = await client.PostAsync(uri, content); var json = await response.Content.ReadAsStringAsync(); }
"https://southcentralus.api.cognitive.microsoft.com/customvision/v1.0/Prediction/{model_id}/image"; using (var content = new ByteArrayContent(myImageAsByteArray)) { content.Headers.ContentType = new MediaTypeHeaderValue("application/octet-stream"); var response = await client.PostAsync(uri, content); var prediction = await response.Content.ReadAsStringAsync(); }