class RestClient
- RestClient
- HTTP::Client
- Reference
- Object
Defined in:
utils/RequestClient.crClass Method Summary
Instance Method Summary
-
#get(url)
Executes a GET request.
Class Method Detail
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 #=> "..."