Posted By

pmd on 02/19/08


Tagged

http delicious ssl


Versions (?)

Who likes this?

4 people have marked this snippet as a favorite

pmd
d4rk
webstic
ab1


delicious API HTTP Basic Authentication


 / Published in: Ruby
 

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

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

  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

Report this snippet  

You need to login to post a comment.