mirror of
https://codeberg.org/reflect/reflect-client-php.git
synced 2025-09-13 17:43:42 +02:00
feat: return http resp as assoc array
This commit is contained in:
parent
4054502b4a
commit
1d3f11e4a3
1 changed files with 2 additions and 1 deletions
|
@ -97,7 +97,8 @@
|
|||
// The first header line and second word will contain the status code.
|
||||
$resp_code = (int) explode(" ", $http_response_header[0])[1];
|
||||
|
||||
return [$resp_code, $resp];
|
||||
// Return response as [<http_status_code>, <resp_body_assoc_array>]
|
||||
return [$resp_code, json_decode($resp)];
|
||||
}
|
||||
|
||||
// Make request and return response over socket
|
||||
|
|
Loading…
Add table
Reference in a new issue