Tcl
Tcl
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 Tcl Downloads
load ./chilkat.dll
# This example assumes the Chilkat API to have been previously unlocked.
# See Global Unlock Sample for sample code.
set http [new_CkHttp]
CkHttp_SetRequestHeader $http "Authorization" "YOUR_REST_KEY"
set jsonStr [CkHttp_quickGetStr $http "https://api2.isbndb.com/book/9780134093413"]
if {[CkHttp_get_LastMethodSuccess $http] == 0} then {
puts [CkHttp_lastErrorText $http]
delete_CkHttp $http
exit
}
puts "Response status code: [CkHttp_get_LastStatus $http]"
puts "Response JSON:"
puts "$jsonStr"
delete_CkHttp $http