Class | EventMachine::Protocols::HttpClient2 |
In: |
lib/protocols/httpcli2.rb
|
Parent: | Connection |
EM.run{ include EM::Protocols conn = HttpClient2.connect 'google.com', 80 req = conn.get('/') req.callback{ p(req.content) }
Make a connection to a remote HTTP server. Can take either a pair of arguments (which will be interpreted as a hostname/ip-address and a port), or a hash. If the arguments are a hash, then supported values include:
:host => a hostname or ip-address; :port => a port number