RestClient
Inherits HTTP::Client < Reference < Object
Class methods
getCharacter(id)
SourcegetEpisode(id)
SourcegetLocation(id)
SourceInstance methods
get(url)
Executes a GET request.
The response will have its body as a String, accessed via HTTP::Client::Response#body.
require "http/client"
client = HTTP::Client.new("www.example.com")
response = client.get("/", headers: HTTP::Headers{"User-Agent" => "AwesomeApp"}, body: "Hello!")
response.body #=> "..."