When I follow the guide as per (http://code.google.com/apis/calendar/
developers_guide_protocol.html#CreatingSingle), or the code for
creating a calendar, I have the same issue.  The new event/calendar is
not created, and the request returns the entire feed, as if I had made
a GET and not a POST.

I am using wget to do this.  I notice that google repsonds back
initially with a "Moved Temporarily" response, and that wget then does
a GET to the new URL.  Is this the problem?  Do I have to get the new
URL and re-POST with wget?

Here's the info for the event problem, please let me know what I might
be doing wrong.  Thanks.

wget command:

wget -d -O -  --header="Content-Type:application/atom+xml" \
       --post-file="c:\temp\wget.txt"  --header="authorization:
GoogleLogin auth=XXXXXXX" \
       "http://www.google.com/calendar/feeds/default/private/full";

(Note:  I have tried both 'default' and the userid and received the
same results).

POST Data File (since wget cannot use stdin; also note that this
example  is right out of the API document)
<entry xmlns='http://www.w3.org/2005/Atom'
    xmlns:gd='http://schemas.google.com/g/2005'>
  <category scheme='http://schemas.google.com/g/2005#kind'
    term='http://schemas.google.com/g/2005#event'></category>
  <title type='text'>Tennis with Beth</title>
  <content type='text'>Meet for a quick lesson.</content>
  <gd:transparency
    value='http://schemas.google.com/g/2005#event.opaque'>
  </gd:transparency>
  <gd:eventStatus
    value='http://schemas.google.com/g/2005#event.confirmed'>
  </gd:eventStatus>
  <gd:where valueString='Rolling Lawn Courts'></gd:where>
  <gd:when startTime='2008-05-30T15:00:00.000Z'
    endTime='2008-05-30T17:00:00.000Z'></gd:when>
</entry>


wget debug info:

Setting --output-document (outputdocument) to -
Setting --check-certificate (checkcertificate) to 0
Setting --header (header) to Content-Type:application/atom+xml
Setting --post-file (postfile) to c:\temp\wget.txt
Setting --header (header) to authorization: GoogleLogin auth=[REMOVED]
DEBUG output created by Wget 1.10.2 on Windows.

seconds 0.00, Caching www.google.com => 64.233.161.147 64.233.161.99
64.233.161.103 64.233.161.104
seconds 0.00, Created socket 46920.
Releasing 0x00952900 (new refcount 1).

---request begin---
POST /calendar/feeds/default/private/full HTTP/1.0

User-Agent: Wget/1.10.2

Accept: */*

Host: www.google.com

Connection: Keep-Alive

Content-Type: application/atom+xml

Content-Length: 695

authorization: GoogleLogin auth=[REMOVED]



---request end---
[writing POST file c:/temp/wget.txt ... done]

---response begin---
HTTP/1.0 302 Moved Temporarily

Set-Cookie: S=calendar=cVnMBmh1OtNmALpiPlqw9Q;Expires=Thu, 21-May-2009
21:48:03 GMT

Location: 
http://www.google.com/calendar/feeds/default/private/full?gsessionid=[REMOVED]

Content-Type: text/html; charset=UTF-8

Date: Wed, 21 May 2008 21:48:03 GMT

Expires: Wed, 21 May 2008 21:48:03 GMT

Cache-Control: private, max-age=0

Content-Length: 283

Server: GFE/1.3

Connection: Keep-Alive



---response end---
Registered socket 46920 for persistent reuse.

Stored cookie www.google.com -1 (ANY) /calendar/feeds/default/private/
<permanent> <insecure> [expiry 2009-05-21 14:48:03] S
calendar=[REMOVED]
Skipping 283 bytes of body: [<HTML>
<HEAD>
<TITLE>Moved Temporarily</TITLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF" TEXT="#000000">
<H1>Moved Temporarily</H1>
The document has moved <A HREF="http://www.google.com/calendar/feeds/
default/private/full?gsessionid=[REMOVED]">here</A>.
</BODY>
</HTML>
] done.
Reusing fd 46920.

---request begin---
GET /calendar/feeds/default/private/full?gsessionid=[REMOVED] HTTP/1.0

User-Agent: Wget/1.10.2

Accept: */*

Host: www.google.com

Connection: Keep-Alive

Cookie: S=calendar=[REMOVED]

Content-Type: application/atom+xml

authorization: GoogleLogin auth=[REMOVED]



---request end---

---response begin---
HTTP/1.0 200 OK

Content-Type: application/atom+xml; charset=UTF-8

Cache-Control: max-age=0, must-revalidate, private

GData-Version: 1.0

Last-Modified: Wed, 21 May 2008 18:15:01 GMT

Date: Wed, 21 May 2008 21:48:03 GMT

Server: GFE/1.3

Connection: Close



---response end---
Disabling further reuse of socket 46920.
Closed fd 46920
14:48:05 URL:http://www.google.com/calendar/feeds/default/private/full?
gsessionid=[REMOVED] [49305] -> "-" [1]



--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to