(Classic ASP) ISBNdb API v2 Get Book Details
Demonstrates how to send a GET request to the ISBNdb API v2 with Authorization header. For more information, see https://isbndb.com/apidocs/v2#examples
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<%
' This example assumes the Chilkat API to have been previously unlocked.
' See Global Unlock Sample for sample code.
' For versions of Chilkat < 10.0.0, use CreateObject("Chilkat_9_5_0.Http")
set http = Server.CreateObject("Chilkat.Http")
http.SetRequestHeader "Authorization","YOUR_REST_KEY"
jsonStr = http.QuickGetStr("https://api2.isbndb.com/book/9780134093413")
If (http.LastMethodSuccess = 0) Then
Response.Write "<pre>" & Server.HTMLEncode( http.LastErrorText) & "</pre>"
Response.End
End If
Response.Write "<pre>" & Server.HTMLEncode( "Response status code: " & http.LastStatus) & "</pre>"
Response.Write "<pre>" & Server.HTMLEncode( "Response JSON:") & "</pre>"
Response.Write "<pre>" & Server.HTMLEncode( jsonStr) & "</pre>"
%>
</body>
</html>
|