WebDAV Headers


You have seen some WebDAV headers in the previous examples, such as Destination and Depth. Two other WebDAV headers you should be aware of are Translate and Overwrite.

The Translate header takes a value of t or f , for true or false . Specifying t tells Exchange to translate the returned contents into a renderable format for the client to read. In most cases, if you are dealing with native Exchange types such as e-mail messages, appointments, or contacts, the default rendering will be done by Outlook Web Access (OWA). This means that instead of getting back an XML document containing the data you requested , you will instead receive the HTML stream that OWA generates ”as if OWA were rendering the item into a browser. This is probably not what you want. As a best practice, you might want to set the Translate header in your code to always be f when you issue a GET command and you want the item's stream content back rather than a rendering of the item. For example, if you issue a GET against an e-mail message with translate equal to f , you will get back the stream of the message formatted using rfc822 rather than the HTML that OWA would use to render the e-mail message to the browser.

The overwrite header takes a value of t or f as well. This header is used with the MOVE and COPY operations; it specifies whether the destination resource should be overwritten if it exists. If you do not specify this header, it will default to t . You should be careful because this might not be the behavior you want. You might instead want to fail if the destination resource already exists. If you set this header to f and the resource exists, you will get back a 402 ( Precondition Failed ) error from Microsoft Internet Information Services (IIS).




Programming Microsoft Outlook and Microsoft Exchange 2003
Programming MicrosoftВ® OutlookВ® and Microsoft Exchange 2003, Third Edition (Pro-Developer)
ISBN: 0735614644
EAN: 2147483647
Year: 2003
Pages: 227
Authors: Thomas Rizzo

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net