PageRenderTime 896ms CodeModel.GetById 282ms app.highlight 3ms RepoModel.GetById 193ms app.codeStats 0ms

/examples/google.rb

http://github.com/jnunemaker/httparty
Ruby | 16 lines | 10 code | 4 blank | 2 comment | 0 complexity | 586c4910e6a7a107bcfd1ac5ac8e997a MD5 | raw file
 1dir = File.expand_path(File.join(File.dirname(__FILE__), '..', 'lib'))
 2require File.join(dir, 'httparty')
 3require 'pp'
 4
 5class Google
 6  include HTTParty
 7  format :html
 8end
 9
10# google.com redirects to www.google.com so this is live test for redirection
11pp Google.get('http://google.com')
12
13puts '', '*' * 70, ''
14
15# check that ssl is requesting right
16pp Google.get('https://www.google.com')