mcqueccu Well-Known Member Licensed User Longtime User Mar 14, 2018 #1 I got this API and I need help implementing it with okhttputils2 with an example code B4X: <?php $url = 'https://test.easydrive.com/api_call.php'; $additional_headers = array('Content-Type: application/json'); $ch = curl_init($url); curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST"); curl_setopt($ch, CURLOPT_POSTFIELDS, $data); // $data is the request payload curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_HTTPHEADER, $additional_headers); $server_output = curl_exec ($ch); ?>
I got this API and I need help implementing it with okhttputils2 with an example code B4X: <?php $url = 'https://test.easydrive.com/api_call.php'; $additional_headers = array('Content-Type: application/json'); $ch = curl_init($url); curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST"); curl_setopt($ch, CURLOPT_POSTFIELDS, $data); // $data is the request payload curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_HTTPHEADER, $additional_headers); $server_output = curl_exec ($ch); ?>
DonManfred Expert Licensed User Longtime User Mar 14, 2018 #2 Use okHttputils2 to call the api. Search the forum about example. There are plenty... Upvote 0