Skip to content

Instantly share code, notes, and snippets.

@dacr
Last active May 28, 2023 11:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dacr/42236b0f8a2d2fd3667d3b873bcb5c96 to your computer and use it in GitHub Desktop.
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
// 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