Skip to content

Instantly share code, notes, and snippets.

@dacr
Last active May 25, 2024 10:18
Show Gist options
  • 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/f7f8169ccb73467c33ecbab6556d6abfd564ee94
// 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.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