fix: http resp. as assoc array (#5)

This commit is contained in:
Victor Westerlund 2023-06-01 11:36:09 +02:00 committed by GitHub
parent 1aae608011
commit cde845d61b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -98,7 +98,7 @@
$resp_code = (int) explode(" ", $http_response_header[0])[1]; $resp_code = (int) explode(" ", $http_response_header[0])[1];
// Return response as [<http_status_code>, <resp_body_assoc_array>] // Return response as [<http_status_code>, <resp_body_assoc_array>]
return [$resp_code, json_decode($resp)]; return [$resp_code, json_decode($resp, true)];
} }
// Make request and return response over socket // Make request and return response over socket