Quantcast
Channel: Web API
Viewing all articles
Browse latest Browse all 4850

Calling WebAPI from Windows Store App

$
0
0

Hi,

Not sure if this is the correct forum, but can anyone give me an example of calling a web API GET action that returns a simple JSON encoded object.

I have seen examples in console apps or windows desktop apps where they call HttpClient.GetAsync() to obtain a HttpResponse object. They access the Content property of the response and use an extension method to call ReadAsAsync<T>(), where T is a client side representation of the JSON serialised server object.

It seems that Windows Store apps do not have the extention methods on HttpContent.

So, now I don't know how to convert my response string (JSON) in to my client side model.

Thanks for your help.


Viewing all articles
Browse latest Browse all 4850

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>