Created
October 20, 2019 07:54
-
-
Save streetsmartdev/1c2bf2db49dced3fd464f9b3325904d4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
val client = OkHttpClient() | |
val okRequest = Request.Builder() | |
.url("https://httpbin.org/get") | |
.build() | |
val responseResource: Response = client.newCall(okRequest).execute() | |
return responseResource.use { | |
responseResource.body?.string()!! | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment