Closed ThibaultVlacich closed 3 years ago
Are you sure the your API sends back the correct Content-Type
header?
Sorry, forgot to close this. It was indeed my bad, the response of my API had an extra line-break at the beginning. After removing it it was fine.
I guess you could argue that $get
is behaving differently than .json()
but it's not that much of an issue (why using an extra dependency, destr
, btw to parse the JSON instead of using the already existing helper method json()
proved by ky
?).
I'm trying to use this module, but it doesn't seem like the
$get
helper is working properly for me.If I'm doing that:
res
is a string containing the json instead of a parsed object.For now, I am forced to do that instead: