Skip to content

v8.1.0

Compare
Choose a tag to compare
@berniegp berniegp released this 03 Sep 21:55

New features

  • Update to XMLHttpRequest version "15 August 2022".
  • Added support for automatic progress events in MockXhrServer via the progressRate field.
  • The MockXhrServer now automatically sets the Content-Length response header for object request handlers.
  • setResponseBody() now automatically sets the Content-Length response header if setResponseHeaders() was not called.

Bug fixes

  • Added missing validation in open() that throws an exception if the method argument is not a method.
  • Distinguish between when the async argument is omitted and when it's undefined in open().
  • On a readystatechange event, the listener list was not cloned prior to calling the event listeners.
  • Added missing header name and value validation in setRequestHeader().
  • Added the Content-Type request header when the request body is a FormData.
  • Don't discard empty header values given to setRequestHeader().