+ /**
+ * Quick static function to GET a URL
+ */
+ public static function quickGet($url, $accept=null)
+ {
+ $client = new HTTPClient();
+ if (!is_null($accept)) {
+ $client->setHeader('Accept', $accept);
+ }
+ $response = $client->get($url);
+ if (!$response->isOk()) {
+ // TRANS: Exception. %s is a profile URL.
+ throw new Exception(sprintf(_m('Could not GET URL %s.'), $url), $response->getStatus());
+ }
+ return $response->getBody();
+ }
+