Skip to content

Instantly share code, notes, and snippets.

@kripy
Created April 11, 2017 21:49
Show Gist options
  • Save kripy/1d397711d3576baa7e5734a893abf2c9 to your computer and use it in GitHub Desktop.
Save kripy/1d397711d3576baa7e5734a893abf2c9 to your computer and use it in GitHub Desktop.
#!/usr/bin/env ruby
# coding: utf-8
require "httparty"
endpoint_URL = "http://www.adweek.com/feed/"
response = HTTParty.get(endpoint_URL, follow_redirects: true, headers: {"User-Agent" => "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36"})
puts response
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment