The following HTML generates a POST message using the export command, producing files in both iCalendar and XML formats:
<form METHOD=POST ENCTYPE="multipart/form-data"
NAME="john.ics"
ACTION="http://calendarserver:12345/export.wcap
?id=t9u9m0eh8x5pu9b&calid=jdoe;john&dtstart=0&dtend=0
&content-out=text/calendar"\>
<ul\>
<li\>Press Export ICAL Now:<input type="submit"
value="Export ICAL now"\>
</li\> </ul\> </form\>
<form METHOD=POST ENCTYPE="multipart/form-data" NAME="john.xml"
ACTION="http://calendarserver:12345/export.wcap
?id=t9u9m0eh8x5pu9b&calid=jdoe;john&dtstart=0
&dtend=0&content-out=text/xml"\>
<ul\>
<li\>Press Export XML Now:<input type="submit"
value="Export XML now”\>
</ul\> </form\>
This is the output generated:
HTTP/1.0 200 Date: Thu, 03 Jun 2002 22:15:52 GMT Content-type: text/calendar Content-disposition: attachment; filename="export.ics" Content-length: 7004 BEGIN:VCALENDAR METHOD:PUBLISH VERSION:6.0 BEGIN:VEVENT UID:tm-001 RECURRENCE-ID:20020519T010000Z DTSTAMP:20020603T221548Z SUMMARY:Calendar Staff DTSTART:20020518T170000Z DTEND:20020518T190000Z CREATED:20020603T024254Z LAST-MODIFIED:20020603T024254Z PRIORITY:1 SEQ:1 GEO:37.463581;-121.897606 DESC:This is the description for event with UID = tm-001 URL:http://calendarserver/susan?uid=tm-001 LOCATION:Green Conference Room STATUS:CONFIRMED TRANSP:OPAQUE END:VEVENT BEGIN:VEVENT UID:tm-001 RECURRENCE-ID:20020526T010000Z DTSTAMP:20020603T221548Z SUMMARY:Calendar Staff DTSTART:20020525T170000Z DTEND:20020525T190000Z CREATED:20020603T024254Z LAST-MODIFIED:20020603T024254Z PRIORITY:1 SEQ:1 GEO:37.463581;-121.897606 DESC:This is the description for event with UID = tm-001 URL:http://calendarserver/susan?uid=tm-001 LOCATION:Green Conference Room STATUS:CONFIRMED TRANSP:OPAQUE END:VEVENT END:VCALENDAR