Skip to content

Instantly share code, notes, and snippets.

@bgupta
Created June 13, 2011 01:32
Show Gist options
  • Save bgupta/1022200 to your computer and use it in GitHub Desktop.
Save bgupta/1022200 to your computer and use it in GitHub Desktop.
def get_collection(foreman_url,path)
response = RestClient.get foreman_url + path.to_s,
{:user => @@foreman_user,
:password => @@foreman_pass,
:headers => { :accept =>:json, :content_type => :json }}
results = JSON.parse(response.to_str)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment