HTTPClient::Client
Inherits HTTP::Client / Reference / Object
Constructors
new(*, max_idle_pool_size = 6, max_pool_size = 0, checkout_timeout : Time::Span = 5.seconds, &block : -> HTTP::Client)
SourceInstance methods
checkout
Sourcedelete(*args, as type, **kwargs)
Sourceexec(request : HTTP::Request)
Executes a 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.exec HTTP::Request.new("GET", "/")
response.body # => "..."
get(*args, as type, **kwargs)
Sourcehead(*args, as type, **kwargs)
Sourceoptions(*args, as type, **kwargs)
Sourcepatch(*args, as type, **kwargs)
Sourcepost(*args, as type, **kwargs)
Sourceput(*args, as type, **kwargs)
Source