HTTP::Client
class HTTP::Client
Overview
An HTTP Client.
One-shot usage
Without a block, an HTTP::Client::Response
is returned and the response's body is available as a String
by invoking HTTP::Client::Response#body
.
require "http/client" response = HTTP::Client.get "http://www.example.com" response.status_code # => 200 response.body.lines.first # => "<!doctype html>"