Ticket #51 (closed enhancement: duplicate)

Opened 2 years ago

Last modified 2 years ago

add simple http client example

Reported by: tmm1 Assigned to: raggi
Priority: major Milestone: EventMachine "Framework"
Keywords: Cc:

Description

require 'rubygems'
require 'eventmachine'

EM.run{
  include EM::Protocols
  conn = HttpClient2.connect 'google.com', 80
  
  req = conn.get('/')
  req.callback{
    p(req.content)
  }

This needs more work still.. should show off how to post to a page with parameters.

Change History

07/14/08 21:06:43 changed by tmm1

  • status changed from new to closed.
  • resolution set to duplicate.