Tiggzi Database JSON Request with Where clause, How do I put it in the header request?
json where clause and other json requests.
How do I do it with this code? I have tried many versions of this and either get everything or nothing. I believe currently nothing comes back. Any advice or samples on using where, update, update where, etc? here is code:
$url = "https://api.tiggzi.com/rest/1/db/coll...";
$data = array("agentID" = "1");
$data_string = json_encode($data);
$headers = array(
"Content-Type: application/json",
"X-Tiggzi-Database-Id: " . self::$MyApplicationId,
"X-Parse-REST-API-Key: " . self::$MyParseRestAPIKey,
"where=" . urlencode($data_string)
);
$handle = curl_init();
curl_setopt($handle, CURLOPT_CUSTOMREQUEST, "GET");
//curl_setopt($handle, CURLOPT_POSTFIELDS, urlencode("where=" . $data_string));
//curl_setopt($handle, CURLOPT_URL, $url . "where=" . urlencode($data_string));
curl_setopt($handle, CURLOPT_HTTPHEADER, $headers);
curl_setopt($handle, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($handle, CURLOPT_RETURNTRANSFER, true);
$data = curl_exec($handle);
curl_close($handle);
$array = json_decode($data);
thanks