A UWP dashboard which provides live updates for the 'Personal Flash in Real-Time (Andy)' and 'Personal Flash in Real-Time (Tony)' artworks -- part of the 'Return to Ritherdon' project by Nicola Ellis. Documentation can be found at
https://git.abbether.net/return-to-ritherdon/rtr-docs/src/branch/master/eyes-and-ears
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
647 B
20 lines
647 B
using System.Net.Http; |
|
using System.Net.Http.Headers; |
|
using System.Threading.Tasks; |
|
|
|
namespace EyesAndEars.UWP.Services { |
|
public static class WebServices { |
|
|
|
private static readonly HttpClient _client = new HttpClient(); |
|
|
|
public static async Task<string> GetJSON(string url) { |
|
_client.DefaultRequestHeaders.Accept.Clear(); |
|
var response = await _client.GetAsync(url); |
|
_client.DefaultRequestHeaders.Accept.Add( |
|
new MediaTypeWithQualityHeaderValue("application/json")); |
|
var result = await _client.GetStringAsync(url); |
|
return result; |
|
} |
|
|
|
} |
|
}
|
|
|