https://toitlang.org/ logo
You can then either get the content from the site ...
# general
f
You can then either get the content from the site itself, or use the following script to download it:
Copy code
import net
import http

import .main show WEBHOOK-ID

WEBHOOK-URI ::= "http://webhook.site/token/$WEBHOOK-ID/request/latest/raw"

main:
  network := net.open
  client := http.Client network
  headers := http.Headers
  headers.add "accept" "application/octet-stream"
  response := client.get --uri=WEBHOOK-URI --headers=headers
  if response.status-code != 200:
    print "Error: $response.status-code"
    exit 1
  payload := response.body.read-all
  client.close
  network.close

  print "jag decode $payload.to-string"