XMLHttpRequest Level 2 defines various new methods over XMLHttRequest level 1, such as the FormData object and new response types.
XMLHttpRequest level 2 adds new functionality over level 1, including:
- The
FormDataobject. - Request-related:
timeoutattribute.withCredentialsattribute.uploadattribute.- Support for new data types at the
send()method:ArrayBuffers,Blobs, andFormData.
- Response-related:
overrideMimeTypemethod.reponseTypeattribute, which enables other response types than plain text.responseattribute, which holds a response whose type is defined in.responseType.
- Progress events