class RestClient

Defined in:

utils/RequestClient.cr

Class Method Summary

Instance Method Summary

Class Method Detail

def self.getCharacter(id) #

[View source]
def self.getEpisode(id) #

[View source]
def self.getLocation(id) #

[View source]

Instance Method Detail

def get(url) #
Description copied from class HTTP::Client

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 #=> "..."

[View source]