The .lc page you have there relies on JavaScript to run the actual call to the Google APIs. Since LC has no JavaScript interpreter, the trick is to make that call yourself.
To try it I used:
Code: Select all
on mouseUp
put "https://www.googleapis.com/books/v1/volumes?q=isbn:9780309217422" into tUrl
put url tURL into fld 1
put the result
end mouseUp
Note the last line - "put the result". This is critical when diagnosing almost any seemingly-mysterious behavior in LiveCode, as "the result" will usually provide any error info if the preceding handler wasn't able to complete successfully (it'll be empty when successful).
In that case, "the result" contained:
Code: Select all
error -Error with certificate at depth: 2 issuer = /C=US/O=Equifax/OU=Equifax Secure Certificate Authority subject = /C=US/O=GeoTrust Inc./CN=GeoTrust Global CA err 20:unable to get local issuer certificate
While seemingly cryptic, it provides some helpful tips, letting us know that the problem stems from not being able to resolve the certificate authority.
By default, when using https libURL will attempt to not only obtain the cert info needed to encrypt the connection, but will also verify that the domain and the certificate match. But many certs are used across multiple domains, and may not match the authority's record - and fortunately libURL provides a way to maintain the encryption without the domain authenticity check - libUrlSetSSLVerification:
Code: Select all
on mouseUp
put "https://www.googleapis.com/books/v1/volumes?q=isbn:9780309217422" into tUrl
libUrlSetSSLVerification false
put url tURL into fld 1
put the result
end mouseUp
Once we turn off libURL's extra level of verification the data is returned as expected, apparently a JSON string.
The risk with turning off libUrlSetSSLVerification is that it exposes a system to the possibility of a man-in-the-middle attack. But since this is something that can only be addressed by the domain owner, in this case it's the best we can do (and apparently good enough for Google).