Created
June 27, 2018 21:23
-
-
Save dmigo/8b2affa54f4e1cc854eb122514a0058d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Flurl will use 1 HttpClient instance per host | |
var person = await "https://api.com" | |
.AppendPathSegment("person") | |
.SetQueryParams(new { a = 1, b = 2 }) | |
.WithOAuthBearerToken("my_oauth_token") | |
.PostJsonAsync(new | |
{ | |
first_name = "Claire", | |
last_name = "Underwood" | |
}) | |
.ReceiveJson<Person>(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment