Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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