Skip to content

Instantly share code, notes, and snippets.

@jfversluis
Last active Mar 24, 2017
Embed
What would you like to do?
Invoking the Refit code
using Refit;
using System;
using System.Net.Http;
using System.Threading.Tasks;
namespace RefitTestApp
{
public class RestClient
{
private readonly IRestClient _restClient;
public RestClient ()
{
_restClient = RestService.For<IRestClient> ("https://jsonplaceholder.typicode.com");
}
public async Task<Foo []> GetPosts ()
{
return await _restClient.GetPosts ();
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment