HTTP Requests
The Windows Runtime includes a Windows.Web.Http.HttpClient
class for sending and receiving HTTP requests: GET, POST, PUT, DELETE, or others. This is not to be confused with the System.Net.Http.HttpClient
class, which is older and more limited. Interesting benefits of Windows.Web.Http.HttpClient
are:
→ Its cache, cookies, and credentials are shared with Image
, MediaElement
, and WebView
(within your app)
→ Cookies persist across runs of your app
→ It gives you a lot of control over caching
→ You can leverage HTTP prefetching to make Windows update your cache when your app isn’t even running
HttpClient
works with HttpRequestMessage
s and HttpResponseMessage
s. It exposes GetAsync
, PostAsync
, PutAsync
, and DeleteAsync
methods, all of ...
Get Universal Windows® Apps with XAML and C# Unleashed now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.