Last active
May 25, 2024 10:18
-
-
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
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 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