Skip to content

Commit

Permalink
fixed an error
Browse files Browse the repository at this point in the history
  • Loading branch information
dbrax committed Dec 21, 2021
1 parent 4ad4339 commit beafeab
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/BeemApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,7 @@ public function whitelistRequest($url, $website)
{

$credentials = base64_encode("$this->key:$this->secret");

$curl = curl_init();

curl_setopt_array($curl, array(
CURLOPT_URL => $url,
CURLOPT_RETURNTRANSFER => true,
Expand All @@ -46,9 +44,13 @@ public function whitelistRequest($url, $website)
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS => array('website' => $website),
CURLOPT_POSTFIELDS =>'{
"website":'.$website.'
}',
CURLOPT_HTTPHEADER => array(
'Authorization: Basic ' . $credentials
'Authorization: Basic ' . $credentials,
'Content-Type: application/json'

),
));

Expand Down

0 comments on commit beafeab

Please sign in to comment.