mirror of
https://github.com/friendica/friendica
synced 2025-04-21 23:50:18 +00:00
Curl Response Refactoring
- extended Curl to parse Curl Response - refactored Network::curl() - replaced every Network::curl() execution with the new Curl container
This commit is contained in:
parent
904fee3bed
commit
2dec8895a9
20 changed files with 466 additions and 382 deletions
|
@ -82,10 +82,10 @@ class Magic extends BaseModule
|
|||
);
|
||||
|
||||
// Try to get an authentication token from the other instance.
|
||||
$x = Network::curl($basepath . '/owa', false, $redirects, ['headers' => $headers]);
|
||||
$curlResult = Network::curl($basepath . '/owa', false, $redirects, ['headers' => $headers]);
|
||||
|
||||
if ($x['success']) {
|
||||
$j = json_decode($x['body'], true);
|
||||
if ($curlResult->isSuccess()) {
|
||||
$j = json_decode($curlResult->getBody(), true);
|
||||
|
||||
if ($j['success']) {
|
||||
$token = '';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue