2023-05-09 22:11:13 +02:00
|
|
|
lib mers_libs/http_requests
|
|
|
|
|
|
|
|
t = thread(() {
|
|
|
|
// because this downloads for so long, the println() will appear after the other one.
|
|
|
|
http_get("https:\//raw.githubusercontent.com/dwyl/english-words/master/words.txt").assume_no_enum()
|
|
|
|
println("got words from word list!")
|
|
|
|
})
|
|
|
|
|
2023-05-14 00:11:36 +02:00
|
|
|
sleep(0.1)
|
2023-05-09 22:11:13 +02:00
|
|
|
|
|
|
|
// this will finish before the thread does.
|
|
|
|
http_get("https:\//github.com/").assume_no_enum()
|
|
|
|
println("got github start page as html")
|
|
|
|
|
2023-05-12 00:44:47 +02:00
|
|
|
t.await()
|
2023-05-09 22:11:13 +02:00
|
|
|
|
|
|
|
http_get("not a url").debug()
|