Base
Overrides auth_handler= so if the authentication changes, the session cookie is cleared.
# File lib/gdata/client/calendar.rb, line 32 def auth_handler=(handler) @session_cookie = nil return super(handler) end
Overrides make_request to handle 302 redirects with a session cookie.
# File lib/gdata/client/calendar.rb, line 38 def make_request(method, url, body = '', retries = 4) response = super(method, url, body) if response.status_code == 302 and retries > 0 @session_cookie = response.headers['set-cookie'] return self.make_request(method, url, body, retries - 1) else return response end end
Custom prepare_headers to include the session cookie if it exists
# File lib/gdata/client/calendar.rb, line 50 def prepare_headers if @session_cookie @headers['cookie'] = @session_cookie end super end
Generated with the Darkfish Rdoc Generator 2.