Logo

Programming-Idioms

This language bar is your friend. Select your favorite languages!
  • C#

Idiom #101 Load from HTTP GET request into a string

Make an HTTP request with method GET to the URL u, then store the body of the response in the string s.

using System.Net.Http;
var client = new HttpClient();
s = await client.GetStringAsync(u);
(def s (slurp u))

New implementation...