Sha256: f0da6d2b23edcc50fe3b2e3d3b42bf45005f8ff76ee12c671c3a766bfb925198
Contents?: true
Size: 561 Bytes
Versions: 17
Compression:
Stored size: 561 Bytes
Contents
require 'rubygems' require 'eventmachine' require '../lib/em-http' EM.run do # Establish a SOCKS5 tunnel via SSH # ssh -D 8000 some_remote_machine connection_options = {:proxy => {:host => '127.0.0.1', :port => 8000, :type => :socks5}} http = EM::HttpRequest.new('http://igvita.com/', connection_options).get :redirects => 2 http.callback { puts "#{http.response_header.status} - #{http.response.length} bytes\n" puts http.response EM.stop } http.errback { puts "Error: " + http.error puts http.inspect EM.stop } end
Version data entries
17 entries across 17 versions & 2 rubygems