```fun fetchJson() { val url = "<http://xi...
# android
h
Copy code
fun fetchJson() {
        val url = "<http://xisbn.worldcat.org/webservices/xid/isbn/9780571276646?method=getMetadata&format=json&fl=*>"

        val request = Request.Builder().url(url).build()

        val client = OkHttpClient()

        client.newCall(request).enqueue(object : Callback {
            override fun onFailure(call: Call?, e: IOException?) {
                println("Error in executing call")
            }

            override fun onResponse(call: Call?, response: Response?) {
                val body = response?.body()
                val gson = GsonBuilder().create()
                println("BODY" + body.toString())
            }
        })
    }