Skip to content

Commit b106e2e

Browse files
committed
Initial commit.
0 parents  commit b106e2e

File tree

5 files changed

+28
-0
lines changed

5 files changed

+28
-0
lines changed

.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
project/project/target
2+
project/target
3+
target

build.sbt

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
enablePlugins(JlinkPlugin)
2+
3+
name := "simple-scala-cli"
4+
5+
version := "0.1"
6+
7+
scalaVersion := "2.13.1"
8+
9+
jlinkModules += "jdk.crypto.ec"

project/build.properties

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
sbt.version = 1.3.8

project/plugins.sbt

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
addSbtPlugin("com.typesafe.sbt" % "sbt-native-packager" % "1.7.0")

src/main/scala/App.scala

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import java.net.URI
2+
import java.net.http.HttpResponse.BodyHandlers
3+
import java.net.http.{HttpClient, HttpRequest}
4+
5+
object App {
6+
def main(args: Array[String]): Unit = {
7+
val uri = new URI("https://google.ca")
8+
9+
val client = HttpClient.newHttpClient()
10+
val request = HttpRequest.newBuilder(uri).build()
11+
val response = client.send(request, BodyHandlers.ofString())
12+
println(Console.YELLOW + response.body() + Console.RESET)
13+
}
14+
}

0 commit comments

Comments
 (0)