Visual FoxPro
Visual FoxPro
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 Visual FoxPro Downloads
LOCAL loHttp
LOCAL lcJsonStr
* This example assumes the Chilkat API to have been previously unlocked.
* See Global Unlock Sample for sample code.
loHttp = CreateObject('Chilkat.Http')
loHttp.SetRequestHeader("Authorization","YOUR_REST_KEY")
lcJsonStr = loHttp.QuickGetStr("https://api2.isbndb.com/book/9780134093413")
IF (loHttp.LastMethodSuccess = 0) THEN
? loHttp.LastErrorText
RELEASE loHttp
CANCEL
ENDIF
? "Response status code: " + STR(loHttp.LastStatus)
? "Response JSON:"
? lcJsonStr
RELEASE loHttp