Jump to content


C# httpclient get value

  • Please log in to reply
No replies to this topic

#1 guillaumeMichael



  • Members
  • Pip
  • 1 posts

Posted 16 May 2019 - 02:52 PM

I'm creating a C# code to retrieve stream from your platform and I having the following error:


InvalidOperationException: No MediaTypeFormatter is available to read an object of type 'Object' from content with media type 'application/vnd.altairsc.v2+json'.


This code works for any other WebApi I request but not from your platform, can you help me ?

            HttpClient httpClient;

            httpClient = new HttpClient();
            httpClient.BaseAddress = new Uri("https://api.iotagora.net/");
                new MediaTypeWithQualityHeaderValue("application/json"));


            var responseMessage = await httpClient.GetAsync("streams");
            var obj = await responseMessage.Content.ReadAsAsync<object>();

I already tried to add this but doesn't work


                new MediaTypeWithQualityHeaderValue("application/vnd.altairsc.v2+json"));

1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users