Skip to content

Commit e5f80bd

Browse files
Merge pull request #213636 from bwren/patch-39
Update data-collector-api.md
2 parents ce5958e + 0d1172b commit e5f80bd

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

articles/azure-monitor/logs/data-collector-api.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -364,6 +364,7 @@ namespace OIAPIExample
364364
client.DefaultRequestHeaders.Add("x-ms-date", date);
365365
client.DefaultRequestHeaders.Add("time-generated-field", TimeStampField);
366366

367+
// If charset=utf-8 is part of the content-type header, the API call may return forbidden.
367368
System.Net.Http.HttpContent httpContent = new StringContent(json, Encoding.UTF8);
368369
httpContent.Headers.ContentType = new MediaTypeHeaderValue("application/json");
369370
Task<System.Net.Http.HttpResponseMessage> response = client.PostAsync(new Uri(url), httpContent);

0 commit comments

Comments
 (0)