> static async void MakeRequest()
> {
> var client = new HttpClient();
> var queryString = HttpUtility.ParseQueryString(string.Empty);
> // Request headers
> client.DefaultRequestHeaders.Add(“Ocp-Apim-Subscription-Key”, “[MY KEY IS HERE]”);
> var uri = "https://www.haloapi.com/stats/hw2/matches/83570b03-2963-4b44-834c-bf77c74f2d0a/events?" + queryString;
> var response = await client.GetAsync(uri);
> System.IO.File.WriteAllText(@“C:\Users\Joseph\Desktop\out1.txt”, response.ToString());
> }
This is the code I’m using but in my output file all I have is this
> StatusCode: 200, ReasonPhrase: ‘OK’, Version: 1.1, Content: System.Net.Http.StreamContent, Headers:
> {
> Pragma: no-cache
> Vary: Accept-Encoding
> Vary: Accept-Encoding
> Strict-Transport-Security: max-age=157680000; includeSubDomains
> X-Content-Type-Options: nosniff
> E2EActivity: mzJ9a4+YgUu6gMC5NzHijw==
> Cache-Control: no-store, must-revalidate, no-cache
> Date: Sat, 25 Feb 2017 20:33:06 GMT
> Content-Length: 954111
> Content-Type: application/json; charset=utf-8
> Expires: Sat, 25 Feb 2017 20:33:07 GMT
> }
It doesn’t actually have any of the game events like when you click the ‘try this’ button on the haloapi website. This is my first time using the api and I’m only an amateur with programming as it is so I’m assuming I’m just making a stupid mistake but any help would be great 