Skip to content

Instantly share code, notes, and snippets.

@dacr
Last active February 3, 2026 20:23
Show Gist options
  • Select an option

  • Save dacr/af1f3b998855ed077b1a6de31008b17a to your computer and use it in GitHub Desktop.

Select an option

Save dacr/af1f3b998855ed077b1a6de31008b17a to your computer and use it in GitHub Desktop.
scala cli - hello world - run context as command line parameters / published by https://github.com/dacr/code-examples-manager #0aaf97c7-71fc-436f-8d1d-be54a7ec9210/f30868e43d63d373d9ac82e6031064842df40fdc
// summary : scala cli - hello world - run context as command line parameters
// 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 : 0aaf97c7-71fc-436f-8d1d-be54a7ec9210
// created-on : 2021-11-11T09:17:28+01:00
// managed-by : https://github.com/dacr/code-examples-manager
// run-with : scala-cli --scala 3.3.0 --dep com.lihaoyi::requests:0.8.0 $file
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