1
0
Fork 0

Curl Response Refactoring

- refactored Network::getCurl()
- replaced every Network::getCur() execution with a Curl Response
This commit is contained in:
Philipp Holzer 2018-10-10 21:20:30 +02:00
commit ffbc688797
No known key found for this signature in database
GPG key ID: 517BE60E2CE5C8A5
9 changed files with 30 additions and 30 deletions

View file

@ -104,8 +104,9 @@ function pubsubhubbub_init(App $a) {
// we don't actually enforce the lease time because GNU
// Social/StatusNet doesn't honour it (yet)
$body = Network::fetchUrl($hub_callback . "?" . $params);
$ret = Network::getCurl()->getCode();
$fetchResult = Network::fetchUrlFull($hub_callback . "?" . $params);
$body = $fetchResult->getBody();
$ret = $fetchResult->getReturnCode();
// give up if the HTTP return code wasn't a success (2xx)
if ($ret < 200 || $ret > 299) {