0

I am trying to read the data pushed to me (after receiving the tickle notification)
when using the curl --header Access-Token:<my_Token> https://api.pushbullet.com/v2/pushes?modified_after=1639898238.125584

I get the string of data and I can extract the information from it when trying to use this code in c#

using (var httpClient = new HttpClient())
                        {
                            using (var request = new HttpRequestMessage(new HttpMethod("GET"), "https://api.pushbullet.com/v2/pushes?modified_after=1639898238.125584"))
                            {
                                request.Headers.TryAddWithoutValidation("Access-Token", "<mu_token>");
                                var response2 = await httpClient.SendAsync(request);
                                Console.WriteLine(response2);

I get only

{ Vary: Accept-Encoding X-Ratelimit-Limit: 16384 X-Ratelimit-Remaining: 16384 X-Ratelimit-Reset: 1639907494 X-Cloud-Trace-Context: 3f7802212dfbf64f9f346c984f87b7c5 Date: Sun, 19 Dec 2021 09:02:38 GMT Server: Google Server: Frontend Content-Length: 2345 Content-Type: application/json; charset=utf-8 }

how can I get the same data as I get using curl?

Amos Rohe
  • 37
  • 4

0 Answers0