Hi guys,
I'm figthing this for 2 days already...
curl IS working properly;
YES I've retrieved all the data of this collection successfully, but...
The issue is very simple:
If I take the "where=" out, it creates a new record and if I use it it returns bad serialization error.
I saw here that appery.io had a problem with this and it was partially solved by creating an array and then json_enconding it.
OK, but how do I make it WITH this "where=" clause?
The code is this: very simple:
$message = "where={'pgId':'535b0c50e4b03823058510bd'}";
$ch = curl_init("https://api.appery.io/rest/1/db/colle...");
curl_setopt($ch, CURLOPT_CUSTOMREQUEST,"POST");
curl_setopt($ch, CURLOPT_POSTFIELDS,$message);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, array('X-Appery-Database-Id: xxxxxxxxxxxxxxxxxxxxxxxxxx','Content-type: application/json', 'Content-Length: '.strlen($message)));
$result = curl_exec($ch);print_r(json_decode($result,true));
Thanks a lot!