Well of course there's HttpWebRequest
in .NET which is adequate. If you want some abstraction there are options like RestSharp ( http://restsharp.org/ ).
What is the best way to consume REST services in Windows Store Apps?
-
07-12-2021 - |
Question
I am quite new to Windows Store Apps developement and I need to consume a REST based web service.
My issue is that there has been so much movement in development technologies made for consuming modern web services during the last years, that in the end it is hard and confusing to find out what is easiest and, especially, what are the most up to date solutions to achieve that.
I want to use the Discogs API in a Windows Store Apps using C#. I only need to use GET.
Thanks.
Edit: The main reason why I ask what is the best way to consume REST services in Windows Store Apps, is because I need a solution compliant with asynchrony.
Solution
OTHER TIPS
I may as well jump on board with another option: the HttpClient class would be the "out-of-the-box" recommendation in .NET 4.5 (including Windows Store Apps) for your scenario. By default, it leverages HttpWebRequest.
There's a QuickStart: Connecting using HttpClient on the Dev Center that addresses the GET scenario that should get you pretty far. And there's a full HttpClient sample as well.