Skip to content

Commit 44eba35

Browse files
Merge pull request SharePoint#5494 from KoenZomers/patch-22
Changing Accept header to request nometadata
2 parents cd712c5 + 8285b32 commit 44eba35

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/general-development/how-to-avoid-getting-throttled-or-blocked-in-sharepoint-online.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,10 +141,10 @@ using (var ctx = new ClientContext("https://contoso.sharepoint.com/sites/team"))
141141
Following sample is in c# format, but the similar User Agent information is recommended to be used even for the JavaScript libraries used in the SharePoint Online pages.
142142

143143
```cs
144-
HttpWebRequest endpointRequest = (HttpWebRequest)HttpWebRequest.Create(sharepointUrl.ToString() + "/_api/web/lists");
144+
HttpWebRequest endpointRequest = (HttpWebRequest) HttpWebRequest.Create(sharepointUrl.ToString() + "/_api/web/lists");
145145
endpointRequest.Method = "GET";
146146
endpointRequest.UserAgent = "NONISV|Contoso|GovernanceCheck/1.0";
147-
endpointRequest.Accept = "application/json;odata=verbose";
147+
endpointRequest.Accept = "application/json;odata=nometadata";
148148
endpointRequest.Headers.Add("Authorization", "Bearer " + accessToken);
149149
HttpWebResponse endpointResponse = (HttpWebResponse)endpointRequest.GetResponse();
150150
```

0 commit comments

Comments
 (0)