delicious API HTTP Basic Authentication


/ Published in: Ruby
Save to your folder(s)

Creates a SSL connection with delicious API using the HTTP basic authentication.


Copy this code and paste it in your HTML
  1. # Creates a SSL connection with delicious API using the HTTP basic authentication.
  2. # From http://ruby.about.com/od/tutorials/ss/delicious_tags.htm
  3. # CHANGE USERNAME & PASS !!!
  4.  
  5. require 'net/https'
  6. http = Net::HTTP.new('api.del.icio.us', 443)
  7. http.use_ssl = true
  8. http.start do |http|
  9. request = Net::HTTP::Get.new('/v1/tags/get')
  10. request.basic_auth 'username', 'password'
  11. response = http.request(request)
  12. response.value
  13. puts response.body
  14. end

URL: http://ruby.about.com/od/tutorials/ss/delicious_tags.htm

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.