Skip to content

Instantly share code, notes, and snippets.

@ryanburnette
Created March 5, 2014 01:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ryanburnette/9359418 to your computer and use it in GitHub Desktop.
Save ryanburnette/9359418 to your computer and use it in GitHub Desktop.
# http://stackoverflow.com/a/1252305/2535178
def get_with_params(domain,path,params)
res = Net::HTTP.get(domain, "#{path}?".concat(params.collect { |k,v| "#{k}=#{CGI::escape(v.to_s)}" }.join('&'))) if not params.nil?
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment