Hele
06/26/2018, 5:32 PMfun fetchJson(){
val url = "<http://xisbn.worldcat.org/webservices/xid/isbn/9780571276646?method=getMetadata&format=json&fl=*&callback=mymethod>"
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()?.toString()
println("BODY" + body.toString())
}
})
}