responseType property

XMLHttpRequestResponseType get responseType

Returns the response type.

Can be set to change the response type. Values are: the empty string (default), "arraybuffer", "blob", "document", "json", and "text".

When set: setting to "document" is ignored if current global object is not a Window object.

When set: throws an "InvalidStateError" DOMException if state is loading or done.

When set: throws an "InvalidAccessError" DOMException if the synchronous flag is set and current global object is a Window object.

MDN Reference

Implementation

_i3.XMLHttpRequestResponseType get responseType =>
    _i3.XMLHttpRequestResponseTypeOptions.values.byName(_i4.getProperty(
      this,
      'responseType',
    ));
set responseType (XMLHttpRequestResponseType value)

Implementation

set responseType(_i3.XMLHttpRequestResponseType value) {
  _i4.setProperty(
    this,
    'responseType',
    value.name,
  );
}