How to write a php curl api call (Please HELP) ? I have tried this
My buildship query parameters are :
prompt, content_buffer
$data = array(
'prompt' => "Who is the us president ?",
'content_buffer' => ' ');
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $api_url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, false);
curl_setopt($ch, CURLOPT_POST, TRUE);
curl_setopt($ch, CURLOPT_POSTFIELDS,json_encode($data) );
curl_setopt($ch, CURLOPT_POST, count($data));
/curl_setopt($ch, CURLOPT_HTTPHEADER, array(
'Content-Type: application/json'
));/
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
$response = curl_exec($ch); curl_close($ch); This does not work.
$response = curl_exec($ch); curl_close($ch); This does not work.
Solution:Jump to solution
Hi @arronjazz, Currently only JavaScript and TypeScript are supported. You can use the HTTP curl instead.
1 Reply
Solution
Hi @arronjazz, Currently only JavaScript and TypeScript are supported. You can use the HTTP curl instead.