BuildShipBBuildShip
Powered by
arronjazzA
BuildShip•2y ago•
2 replies
arronjazz

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.
Solution
Hi @arronjazz, Currently only JavaScript and TypeScript are supported. You can use the HTTP curl instead.
Jump to solution
BuildShip banner
BuildShipJoin
Join founders, builders, devs using Low-code / No-code to create backend, APIs, scheduled Jobs, automation, AI workflows
7,971Members
Resources
Recent Announcements

Similar Threads

Was this page helpful?

Similar Threads

API call to have openAI with streaming
jiefu95Jjiefu95 / ❓・buildship-help
17mo ago
API Call
KorixoKKorixo / ❓・buildship-help
3y ago
how do i make an API call to a supabase function? I have the variable to pass its just one variable.
BBAznBBBAzn / ❓・buildship-help
2y ago
How to add authentication on api call trigger
malte.huenerMmalte.huener / ❓・buildship-help
2y ago