snipplets.dev/snipplets/code/Crystal/http_client.cr
2023-08-05 22:45:06 +03:00

12 lines
272 B
Crystal

require "json"
require "http/client"
minecraft_url = "https://launchermeta.mojang.com/mc/game/version_manifest_v2.json"
response = HTTP::Client.get minecraft_url
version_manifest = JSON.parse(response.body)
version = version_manifest["latest"]["release"]
puts version