Created
December 28, 2017 05:48
-
-
Save kyanny/5821f47ca5d44ef96765c94995f679a2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'faraday' | |
require 'logger' | |
url = 'https://requestb.in/1fkjebe1' | |
proxy = ENV.fetch('PROXY') | |
logger = Logger.new($stdout) | |
conn = Faraday.new do |faraday| | |
faraday.response :logger, logger | |
faraday.proxy proxy | |
faraday.adapter Faraday.default_adapter | |
res = faraday.get do |req| | |
req.url url | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment