0
<?php
$header = array(
   'Accept: application/json',
   'Authorization: Bearer <KEY API HERE>',
);

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, '<WEB HERE>');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_HTTPHEADER, $header);
curl_setopt($ch, CURLOPT_POST, 1);
$result = curl_exec($ch);

if(curl_errno($ch)){
   return 'Request Error:' . curl_error($ch);
}
echo $result;
?>

Can anyone help me translating this code to java program(netbeans) ? im beginner in cURL code php

Midmines
  • 9
  • 3

0 Answers0