Example of POST query
Hello,I am trying to post data into timesheet note.This is what my code looks like$data = array ( 'time_entry' => array ( 'note' => 'test via API', ),);$urltopost = "http://samplecompany.freshdesk.com/helpdesk/time_sheets/1111111.xml";$header[] = "Content-type: application/xml";$ch = curl_init ($urltopost);curl_setopt ($ch, CURLOPT_POST, true);curl_setopt ($ch, CURLOPT_POSTFIELDS, http_build_query($data));curl_setopt ($ch, CURLOPT_USERPWD, sampleuser:password);curl_setopt ($ch, CURLOPT_HTTPHEADER, $header);curl_setopt ($ch, CURLOPT_RETURNTRANSFER, true);curl_setopt ($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);curl_setopt ($ch, CURLOPT_RETURNTRANSFER, TRUE);curl_setopt ($ch, CURLOPT_SSL_VERIFYHOST, 0);curl_setopt ($ch, CURLOPT_SSL_VERIFYPEER, 0);try { $returndata = curl_exec ($ch); $e = curl_error($ch);}catch(Exception $e) { throw new Exception ('An error occured! '.$e->getMessage());}curl_close($ch);echo "<pre>";print_r ($returndata);echo "</pre>";I have tried