Last active
February 3, 2026 20:26
-
-
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/1cc7a23888cba2b3303c4904867489a2d2d15dae
This file contains hidden or 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 License Version 2.0 (https://www.apache.org/licenses/LICENSE-2.0.txt) | |
| // 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.4.2" | |
| //> 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