This is the code I have so far:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System;
using System.Net.Http;
usi
Check out Refit for making calls to REST services from .NET. I've found it very easy to use:
Refit: The automatic type-safe REST library for .NET Core, Xamarin and .NET
Refit is a library heavily inspired by Square's Retrofit library, and it turns your REST API into a live interface:
public interface IGitHubApi {
[Get("/users/{user}")]
Task GetUser(string user);
}
// The RestService class generates an implementation of IGitHubApi
// that uses HttpClient to make its calls:
var gitHubApi = RestService.For("https://api.github.com");
var octocat = await gitHubApi.GetUser("octocat");