Perl
Perl
ISBNdb API v2 Get Book Details
See more HTTP Misc Examples
Demonstrates how to send a GET request to the ISBNdb API v2 with Authorization header.Chilkat Perl Downloads
use chilkat();
# This example assumes the Chilkat API to have been previously unlocked.
# See Global Unlock Sample for sample code.
$http = chilkat::CkHttp->new();
$http->SetRequestHeader("Authorization","YOUR_REST_KEY");
$jsonStr = $http->quickGetStr("https://api2.isbndb.com/book/9780134093413");
if ($http->get_LastMethodSuccess() == 0) {
print $http->lastErrorText() . "\r\n";
exit;
}
print "Response status code: " . $http->get_LastStatus() . "\r\n";
print "Response JSON:" . "\r\n";
print $jsonStr . "\r\n";