in reply to json Array with URI
Maybe the error comes from:
Content => encode_json($data)
You don't show us what is in $data and you don't show us the line number where the error occurs. The error message (before "Content-type: applic...") suggests that you pass a string containing HTTP headers to decode_json somewhere, but it's hard to know what you're doing wrong when you are not showing us the relevant code, data and error message.
If decode_json( $json_text ); fails, then you have something in $json_text that is not valid JSON. Inspecting $json_text will tell you more about it.
|
|---|