Skip to content

Instantly share code, notes, and snippets.

@phlegx
Created June 4, 2012 09:21
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 phlegx/2867404 to your computer and use it in GitHub Desktop.
Save phlegx/2867404 to your computer and use it in GitHub Desktop.
url = URI.parse('cluster-cm.example.com/balancer-manager')
req = Net::HTTP::Post.new(url.path)
req.use_ssl = true
req.basic_auth 'deployer@example.com', 'pass'
req.set_orm_data({'status_D' => '1'})
resp = Net::HTTP.new(url.host, url.port).start {|http| http.request(req) }
puts resp
####
Error:
`<main>': undefined method `use_ssl=' for #<Net::HTTP::Post POST> (NoMethodError)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment