Ruby on Rails
Wednesday, June 15, 2011
Http delete with authentication ruby
require 'rubygems'
require "net/http"
Net::HTTP.start('www.example.com') {|http|
req = Net::HTTP::Delete.new("/api/products/#{product_id}")
req.basic_auth '#{user_name}', '#{password}'
response = http.request(req)
}
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment