Hello,
Using PB 2022 R3
Need to call an API, parameter in key-value pair. How to pass the same in Powerbuilder?
<?php
$create = [
"secret" => "API_SECRET", // your API secret from (Tools -> API Keys) page
];
$cURL = curl_init("https://app.bulkwise.in/api/create/wa.link");
curl_setopt($cURL, CURLOPT_RETURNTRANSFER, true);
curl_setopt($cURL, CURLOPT_POSTFIELDS, $create);
$response = curl_exec($cURL);
curl_close($cURL);
$result = json_decode($response, true);
// do something with response
print_r($result);
The above is the code that's working in PHP.
Now need to make it to work in Powerbuilder also. See the parameter $create, it's a key-value pair.
How to pass these value, if we need to use HTTPClient in PB? Any idea, workaround, solution?
Happiness Always
BKR Sivaprakash
https://docs.appeon.com/pb2019/powerscript_reference/ch10s586.html