Created
September 13, 2024 02:04
-
-
Save skryvets/63198468ba030b3528d0bc34ec9f58d7 to your computer and use it in GitHub Desktop.
Simple kotlin script
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
#!/usr/bin/env kotlin | |
@file:Repository("https://repo.maven.apache.org/maven2/") | |
@file:DependsOn("com.squareup.okhttp3:okhttp:4.12.0") | |
import okhttp3.OkHttpClient | |
import okhttp3.Request | |
val client = OkHttpClient() | |
val request = Request.Builder().url("https://example.com").build(); | |
val response = client.newCall(request).execute() | |
print(response.body?.string()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment