Skip to content

Commit

Permalink
curl comment cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
cliffcaseyyet committed Feb 4, 2025
1 parent 7de3e58 commit b7df514
Showing 1 changed file with 0 additions and 16 deletions.
16 changes: 0 additions & 16 deletions src/loader/moodle_curl_lrs.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,26 +53,10 @@ function load(array $config, array $events) {
$auth = base64_encode($username.':'.$password);
$postdata = json_encode($statements);



if ($postdata === false) {
throw new \Exception('JSON encode error: '.json_last_error_msg());
}

//Old Client Code
/*$request = new \curl();
print_r($url);
$responsetext = $request->post($url, $postdata, [
'CURLOPT_HTTPHEADER' => [
'Authorization: Basic '.$auth,
'X-Experience-API-Version: 1.0.3',
'Content-Type: application/json',
],
]);
print_r($responsetext);
print_r($request);
$responsecode = $request->info['http_code'];*/

$request = curl_init();
curl_setopt($request, CURLOPT_URL, $url);
curl_setopt($request, CURLOPT_POSTFIELDS, $postdata);
Expand Down

0 comments on commit b7df514

Please sign in to comment.