Last active
May 28, 2023 11:08
-
-
Save dacr/42236b0f8a2d2fd3667d3b873bcb5c96 to your computer and use it in GitHub Desktop.
scala cli - http hello world - run context as code / published by https://github.com/dacr/code-examples-manager #f0c6b79a-7293-4532-84da-53fd0f3a57c6/e32803a2543d2b069c9c338bddfbc11f45712264
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
// summary : scala cli - http hello world - run context as code | |
// keywords : scala, scalacli, helloworld, requests, http, @testable | |
// publish : gist | |
// authors : David Crosson | |
// license : Apache NON-AI License Version 2.0 (https://raw.githubusercontent.com/non-ai-licenses/non-ai-licenses/main/NON-AI-APACHE2) | |
// id : f0c6b79a-7293-4532-84da-53fd0f3a57c6 | |
// created-on : 2021-11-11T09:04:19+01:00 | |
// managed-by : https://github.com/dacr/code-examples-manager | |
// run-with : scala-cli $file | |
// --------------------- | |
//> using scala "3.3.0" | |
//> using dep "com.lihaoyi::requests:0.8.0" | |
// --------------------- | |
val r = requests.post("https://httpbin.org/post", data = "Hello World") | |
println(r.text()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment