Skip to content

Instantly share code, notes, and snippets.

@bleroy
Created February 23, 2016 01:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bleroy/8443953a1fd661eb276a to your computer and use it in GitHub Desktop.
Save bleroy/8443953a1fd661eb276a to your computer and use it in GitHub Desktop.
var client = new RestClient("http://microsoft.com");
var request = new RestRequest("people/{alias}");
var alias = "beleroy";
request.AddUrlSegment("alias", alias);
var person = await client.ExecuteGetTaskAsync<Person>(request).Data;
Console.WriteLine($"{alias} stands for {person.FirstName} {person.LastName}.");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment