Skip to content

Instantly share code, notes, and snippets.

@joshcooper
Created April 10, 2020 22:56
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 joshcooper/98344933dbd8c44d63acd9183e1481b3 to your computer and use it in GitHub Desktop.
Save joshcooper/98344933dbd8c44d63acd9183e1481b3 to your computer and use it in GitHub Desktop.
require 'puppet'
module Puppet::Server
class HttpClient
def get(url, headers: {}, params: {}, options: {}, &block)
puts "GET #{url}"
end
end
end
Puppet.initialize_settings([], true, true, { 'http' => Puppet::Server::HttpClient.new })
httpclient = Puppet.runtime['http']
httpclient.get(URI("http://www.google.com"))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment