On 9/11/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Hi there, > > I've been trying to add an event via ruby, and everything is great, > except that when I do the second post to actually add the event, I get > another redirect. I assumed that the gsessionid should be appended to > the end of the url. Is this correct? Any other ideas?
This is correct. There are two ways to avoid the redirect on subsequent requestions: 1) append the gssessionid query parameter returned in the redirect to subsequent requests, or 2) return the session cookie dropped in the redirect response with subsequent requests. This assumes that all of the requests are using the same authentication context (username/password), otherwise additional redirects may occur. I don't have a lot of Ruby experience so my interpretation of your code is suspect, but is your code assuming that the first request will *always* be redirected? This isn't guaranteed to be the case; it's a possibility, not a certainty. Can you add some debug code to look at the urls constructed for the 1st and 2nd request, as well as the http response code in the first request? For an even more detailed picture of what's happening, you can use an http sniffer to look at what's happening at the wire level. -- Kyle -- Kyle --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Calendar Data API" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-calendar-help-dataapi -~----------~----~----~----~------~----~------~--~---
