On Thu, Jan 29, 2009 at 7:07 AM, [email protected] <[email protected]> wrote: > > I added support of Google Calendar to my program (.NET, Framework > 1.1). All works fine except deleting events. Server returns "501 Not > Implemented". I am using the same request as for editing (of course > DELETE instead of PUT). > > see code below > > > 1. works fine 2. failed > > > Can anybody tell me whats wrong? > > > ______________________________________________________________________ > > > 1. response = DoRequest(gev.UpdateUrl, HTTP.Put, > gev.InnerEvent.OuterXml) > > > 2. response = DoRequest(gev.UpdateUrl, HTTP.Delete, > gev.InnerEvent.OuterXml, gev.ETag) > ______________________________________________________________________ > > > Private Const URL_FEED_EVENTS = "http://www.google.com/ > calendar/ > feeds/default/private/full" > > > Private Const HEADER_VERSION_KEY = "GData-Version" > Private Const HEADER_VERSION_VALUE = "2" > Private Const HEADER_AUTHORISATION = "Authorization: > GoogleLogin > auth=" 'add token here > Private Const HEADER_NO_REDIRECT = "X-If-No-Redirect:True" > Private Const HEADER_IF_NONE_MATCH = "If-None-Match: " > > > Private Function DoRequest(ByVal url$, ByVal method$, ByVal > data > $) As WebResponse > Return DoRequest(url, method, data, "") > End Function > > > Private Function DoRequest(ByVal url$, ByVal method$, ByVal > data > $, ByVal eTag$) As WebResponse > 'create and setup request > If sessionId <> "" Then url = AddParameterToUrl(url, > KEY_SESSION_ID, sessionId) > request = HttpWebRequest.Create(url) > request.Method = method > request.Headers.Add(HEADER_VERSION_KEY, > HEADER_VERSION_VALUE) > request.Headers.Add(HEADER_AUTHORISATION & token) > If Not eTag Is Nothing AndAlso eTag <> "" Then > request.Headers.Add(HEADER_IF_NONE_MATCH & eTag) > request.Credentials = New NetworkCredential(Email, password) > request.ContentType = CONTENT_TYPE_DEFAULT > request.KeepAlive = True > 'prepare data > If Not data Is Nothing AndAlso data <> "" Then > HTTP.WriteToRequest(request, data) > End If > 'do request > Return request.GetResponse() > End Function
Can you provide us with an HTTP transcript, as described here: http://code.google.com/apis/gdata/articles/debugging_client_libs.html#dotnet -- Trevor Johns --~--~---------~--~----~------------~-------~--~----~ 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?hl=en -~----------~----~----~----~------~----~------~--~---
