Reputation: 4428
I get the error in the title when doing something like this:
$zurl = "https://api.zotero.org/something";
require_once 'HTTP/Request2.php';
$r = new HTTP_Request2($zurl);
$r->setMethod(HTTP_Request2::METHOD_GET);
$r->setHeader("Zotero-API-Version", "3");
$r->setHeader("Authorization", "Bearer ".$apiKey);
$response = $r->send();
This article seems to explain it to those who understand. I don't understand, unfortunately.
The article says it is (or might be) a problem with the certificate.
What can I do resolve this problem? (I am on a shared host.)
Upvotes: 1
Views: 3526
Reputation: 4428
I get no answers to this one. I believe the reason might be that it is more common to use CURL directly (instead of the more high level Http_Request2 which I prefer). Two days ago @GingerDog posted a way to handle this:
// before send add:
$r-setAdapter("curl");
See how to make https request using php Http_Request2
Upvotes: 1