Name

XML.contentType Property — MIME content type for XML dat sent via XML.send( ) and XML.sendAndLoad( )

Availability

Flash 5 Build 41 or later

Synopsis

XMLdoc.contentType

Access

Read/write

Description

The contentType property is the MIME type that is sent to a server when XML.send( ) or XML.sendAndLoad( ) is invoked. It defaults to application/x-www-urlform-encoded. The contentType property may be modified for specific XML objects, or XML.prototype.contentType may be modified to affect all XML objects.

The contentType property first appeared in Build 41 of the Flash 5 Player, before which it was not possible to set MIME type. Check contentType’s validity by comparing it to undefined or using the getVersion( ) function to determine the Player version and build.

Usage

See important notes on setting MIME type under the XML.send( ) entry.

See Also

XML.send( ), XML.sendAndLoad( )

Get ActionScript: The Definitive Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.