Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > Problem of trying to get gmail atom feed in ruby

Reply
Thread Tools

Problem of trying to get gmail atom feed in ruby

 
 
Carfield Yim
Guest
Posts: n/a
 
      05-30-2008
I write some simple ruby code to try to get gmail atom feed:

http = Net::HTTP::new('mail.google.com', 443);
http.use_ssl = true ;
http.start {
request = Net::HTTP::Get.new('/mail/feed/atom"');
request.basic_auth(USERNAME,PASSWORD);
response = http.request(request)
response.value
puts response.body
}

But it is fail...

warning: peer certificate won't be verified in this SSL session
/usr/lib/ruby/1.8/net/http.rb:2097:in `error!': 400 "Bad
Request" (Net::HTTPServerException)
from /usr/lib/ruby/1.8/net/http.rb:2106:in `value'
from /home/carfield/respository/atomtest.rb:13
from /usr/lib/ruby/1.8/net/http.rb:543:in `start'
from /home/carfield/respository/atomtest.rb:9

Anyone know how can I solve it? Done a brief google search doesn't
help...
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Cannot get python to read a CAP file link in an ATOM feed Brian Kaplan Python 0 02-10-2009 09:44 PM
Problem reading ATOM Feed. =?Utf-8?B?bWF2cmlja18xMDE=?= ASP .Net 0 05-08-2007 02:30 PM
[ANN] ruby-feedparser : RSS/Atom feed parser Lucas Nussbaum Ruby 0 11-15-2005 11:24 PM
Atom-Newsfeed on Website (Atom->HTML) chlori HTML 1 09-21-2005 03:43 PM
JSTL and Atom feed parsing Marc Dugger Java 0 12-15-2004 06:19 PM



Advertisments