Skip to content

Instantly share code, notes, and snippets.

@jskopek
Created April 24, 2018 05:44
Show Gist options
  • Save jskopek/a707d237e0a39acaf311ad79dcdf836c to your computer and use it in GitHub Desktop.
Save jskopek/a707d237e0a39acaf311ad79dcdf836c to your computer and use it in GitHub Desktop.
public MediaServices(string tenantDomain, string restApiUrl, string clientId, string clientSecret)
{
_tenantDomain = tenantDomain;
_restApiUrl = restApiUrl;
_clientId = clientId;
_clientSecret = clientSecret;
_httpClient = new HttpClient { BaseAddress = new Uri(restApiUrl) };
_httpClient.DefaultRequestHeaders.Add("x-ms-version", "2.15");
_httpClient.DefaultRequestHeaders.Add("DataServiceVersion", "3.0");
_httpClient.DefaultRequestHeaders.Add("MaxDataServiceVersion", "3.0");
_httpClient.DefaultRequestHeaders.Add("Accept", "application/json;odata=verbose");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment