Hi, I've been trying out Ruby and Open URI with ReviewBoard's API and it seems to work fine with url's that don't require authentication, but any that do (eg. "http://machinename/reviewboard/api/review-requests?time-added-from=whatever" - this only seems to need auth when request parameters are added, is this correct?) are failing with the following error:
C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/open-uri.rb:346:in `open_http2013-03-21 ': 401 UNAUTHORIZED (OpenURI::HTTPError) from C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/open-uri.rb:775:in `buffer_open' from C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/open-uri.rb:203:in `block in open_loop' from C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/open-uri.rb:201:in `catch' from C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/open-uri.rb:201:in `open_loop' from C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/open-uri.rb:146:in `open_uri' from C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/open-uri.rb:677:in `open' from C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/open-uri.rb:33:in `open' from C:/Users/me/Documents/reviewboard.rb:30:in `<main>' [Finished in 2.5s with exit code 1] And my request looks like: results = > JSON.parse(open("http://machinename/reviewboard/api/review-requests?time-added-from=whatever", > > :http_basic_authentication=>[user,pass],"Accept"=>'application/json') {|io| > io.read}) For whatever reason the authentication is just being ignored. Ruby does not seem to have any support for the "username:password@URL" format of auth either. Anyone have any experience with this? Thanks, E -- Want to help the Review Board project? Donate today at http://www.reviewboard.org/donate/ Happy user? Let us know at http://www.reviewboard.org/users/ -~----------~----~----~----~------~----~------~--~--- To unsubscribe from this group, send email to reviewboard+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/reviewboard?hl=en --- You received this message because you are subscribed to the Google Groups "reviewboard" group. To unsubscribe from this group and stop receiving emails from it, send an email to reviewboard+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.