Quantcast
Channel: Joomla! Forum - community, help and support
Viewing all articles
Browse latest Browse all 2282

Joomla! 5.x Coding • Http class changed in J! 5.2??

$
0
0
Has accessing data from an HTTP call changed? I'm sure (I think) that this (cut down example) worked fine before updating to 5.2

Code:

$hQuery = new HttpFactory();$request = $hQuery->getHttp();$response = $request->get($url, $headers);$dates = json_decode($response->body);
Now json_decode complains that it needs a string not a stream.

How do I get this to be a string? Surely I don't have to write it to a file and get it back out????

Statistics: Posted by MarkRS — Fri Oct 18, 2024 2:38 pm



Viewing all articles
Browse latest Browse all 2282

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>