Changeset View
Changeset View
Standalone View
Standalone View
src/future/github/PhutilGitHubFuture.php
Show First 20 Lines • Show All 94 Lines • ▼ Show 20 Lines | try { | ||||
$data = array(); | $data = array(); | ||||
} | } | ||||
} catch (PhutilJSONParserException $ex) { | } catch (PhutilJSONParserException $ex) { | ||||
throw new PhutilProxyException( | throw new PhutilProxyException( | ||||
pht('Expected JSON response from GitHub.'), | pht('Expected JSON response from GitHub.'), | ||||
$ex); | $ex); | ||||
} | } | ||||
return id(new PhutilGitHubResponse()) | return (new PhutilGitHubResponse()) | ||||
->setStatus($status) | ->setStatus($status) | ||||
->setHeaders($headers) | ->setHeaders($headers) | ||||
->setBody($data); | ->setBody($data); | ||||
} | } | ||||
private function isNotModifiedResponse($status) { | private function isNotModifiedResponse($status) { | ||||
return ($status->getStatusCode() == 304); | return ($status->getStatusCode() == 304); | ||||
} | } | ||||
Show All 19 Lines |
Content licensed under Creative Commons Attribution-ShareAlike 4.0 (CC-BY-SA) unless otherwise noted; code licensed under Apache 2.0 or other open source licenses. · CC BY-SA 4.0 · Apache 2.0