Skip to content

Instantly share code, notes, and snippets.

@indy-singh
Created May 21, 2023 19:53
Show Gist options
  • Save indy-singh/205165ab897df87e8868007e010bf6b1 to your computer and use it in GitHub Desktop.
Save indy-singh/205165ab897df87e8868007e010bf6b1 to your computer and use it in GitHub Desktop.
var httpClient = new HttpClient();
var httpRequestMessage = new HttpRequestMessage(HttpMethod.Post, "grab free url from https://public.requestbin.com/r");
httpRequestMessage.Content = new StringContent("{ \"name\": \"Yoda\" }", Encoding.UTF8, "application/json");
var httpResponseMessage = httpClient.SendAsync(httpRequestMessage).Result;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment