Så här använder du sidan och API:t.
curl "https://henrikhjelm.se/api/morse.php?text=Hello%20World&mode=encode"
curl -X POST "https://henrikhjelm.se/api/morse.php" \
-H "Content-Type: application/json" \
-d '{"text":".... . .-.. .-.. --- / .-- --- .-. .-.. -..","mode":"decode"}'
curl -L "https://henrikhjelm.se/api/morse.php?mode=audio&text=Hello%20World" -o morse.wav
curl -L -X POST "https://henrikhjelm.se/api/morse.php?mode=audio" \
-H "Content-Type: application/json" \
-d '{"text":"Hello World"}' -o morse.wav
Invoke-RestMethod -Method Get -Uri "https://henrikhjelm.se/api/morse.php?text=Hello World&mode=encode"
Invoke-RestMethod -Method Post -Uri "https://henrikhjelm.se/api/morse.php" -ContentType "application/json" -Body (@{ text = ".... . .-.. .-.. --- / .-- --- .-. .-.. -.."; mode = "decode" } | ConvertTo-Json)
(Invoke-WebRequest -Uri "https://henrikhjelm.se/api/morse.php?mode=audio&text=Hello World" -OutFile "morse.wav")
Invoke-WebRequest -Method Post -Uri "https://henrikhjelm.se/api/morse.php?mode=audio" -ContentType "application/json" -Body (@{ text = "Hello World" } | ConvertTo-Json) -OutFile "morse.wav"