Forums Mingle API

ruby NetHTTP example#590

Subscribe to ruby NetHTTP example 1 post, 1 voice

 
Avatar trpdaddy 2 post(s) #1466

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’
require ‘uri’

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!

Forums Mingle API