This page is In Progress

Notice: The WebPlatform project, supported by various stewards between 2012 and 2015, has been discontinued. This site is now available on github.

contentType

Property of apis/xhr/propertiesapis/xhr/properties

Syntax

var result = element.contentType;
element.contentType = value;

Examples

// 1. Create XDR object
xdr = new XDomainRequest();

// 2. Open connection with server using GET method
xdr.open("GET", "http://www.contoso.com/xdr.txt");

// 3. Display the content-type
alert(xdr.contentType);

See also

Related pages

  • Reference
  • IHTMLXDomainRequest
  • XDomainRequest
  • Conceptual
  • Introducing Cross-domain Request

Attributions