I’m trying to use an online service that responds to calls structured this way:
curl -i -k -3 -X POST https://full_url
-H “some-headervalue: value”
-d ‘{ “field1”:“val1”,“field2”:“val2” }’
I’ve followed the Netmake sample setting field1 and field2 in the parms array and called sc_webservice replacing 80 with 443 for https. Soemthing like this:
$parms[‘field1’] = ‘val1’;
$parms[‘field2’] = ‘val2’;
$parms = http_build_query($parms);
$resposta = sc_webservice(“curl”, “https://full_url”, 443, “POST”, $parms, array(CURLOPT_RETURNTRANSFER => true,CURLOPT_HEADER => true, CURLOPT_SSL_VERIFYPEER => false, CURLOPT_SSLVERSION => 3, CURLOPT_HTTPHEADER => “some-headervalue: value”), 30, true);
Nothing happens. Looking at the console response I see something like this “curl_setopt(): You must pass either an object or an array with the CURLOPT_HTTPHEADER, CURLOPT_QUOTE, CURLOPT_HTTP200ALIASES and CURLOPT_POSTQUOTE arguments…”
Can someone guide me in correct usage?