azakir
221
4
Laravel

guzzle issue?

Posted 2 years ago by azakir

when i try to collect some json data guzzle breaks its formatting and renders the json non-functional. This is what the data should look like: https://zkillboard.com/api/killID/63281954/

in the pastebin below you can see the response guzzle gives me. removed the headers for privacy reasons.

$client = new Client();
            $res = $client->get('https://www.zkillboard.com/api/killID/'. $parse);
            $body = $res->getBody()->getContents();

            dd($body);

gives me this invalid json https://pastebin.com/J9Wu4M4i

Please sign in or create an account to participate in this conversation.