#typhoeus_test.rb
require ‘typhoeus’
print "Site Name: "
site_name = gets.chomp
response = Typhoeus.get(“www.#{site_name}.com”)
puts response.code
===================================================
Output:
/Workspace$ ruby typhoeus_test.rb
Site Name: google
302
Site Name: yahoo
301
Site Name: gmail
301
Site Name: jmail
200
Site Name: joojle
200
Site Name: bing
200
====================================================
Query:
Please Let me explain the response codes 200,301 and 302.
Where the 200 code is received for unavailable websites.
why do I get temporary redirect status code 302 for google and permanent
redirect 301 for yahoo here?