Skip to content

Instantly share code, notes, and snippets.

@andreasohlund
Created June 11, 2013 09:30
Show Gist options
  • Select an option

  • Save andreasohlund/5755631 to your computer and use it in GitHub Desktop.

Select an option

Save andreasohlund/5755631 to your computer and use it in GitHub Desktop.
using RestSharp;
var client = new RestClient("http://localhost:8888/api");
var request = new RestRequest("endpoints", Method.GET);
var response = client.Execute<List<Endpoint>>(request);
foreach(var endpoint in response.Data)
{
Console.Out.WriteLine(endpoint.Name);
}
class Endpoint
{
public string Name{get;set;}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment