Class: Async::HTTP::Client
- Inherits:
-
Object
- Object
- Async::HTTP::Client
- Defined in:
- lib/async/http/client.rb
Constant Summary collapse
- GET =
'GET'.freeze
Instance Method Summary collapse
- #get(path, headers = {}) ⇒ Object
-
#initialize(endpoints, protocol_class = Protocol::HTTP11) ⇒ Client
constructor
A new instance of Client.
Constructor Details
Instance Method Details
#get(path, headers = {}) ⇒ Object
36 37 38 39 40 |
# File 'lib/async/http/client.rb', line 36 def get(path, headers = {}) connect do |protocol| protocol.send_request(GET, path, headers) end end |