Parse URL (URI)
- URI
require "uri"
url = "https://github.com:443/szabgab/crystal-mine.cr?name=Foo"
uri = URI.parse url
puts uri.scheme
puts uri.host
puts uri.port
puts uri.path
puts uri.query
Press ← or → to navigate between chapters
Press S or / to search in the book
Press ? to show this help
Press Esc to hide this help
require "uri"
url = "https://github.com:443/szabgab/crystal-mine.cr?name=Foo"
uri = URI.parse url
puts uri.scheme
puts uri.host
puts uri.port
puts uri.path
puts uri.query