Logo

Programming-Idioms

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

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.

$s = file_get_contents($u);

file_get_contents() can make a GET request over HTTP.
(def s (slurp u))

New implementation...