ruby NetHTTP example#590
|
|
Hi, I started this post to ask if someone could post a NetHTTP example… but mine is working now so here it is: require ‘net/http’ Net::HTTP.start(‘12.34.56.78’, 8080) {|http|
req = Net::HTTP::Get.new(’/projects/test_project/cards.xml’)
req.basic_auth(‘username’, ‘password’)
response = http.request(req)
puts response.body.to_s Enjoy! |
