A hook to specify how the XMLHttpRequest response should be read. Useful for reading response headers and cookies. Defaults to a function that returns a JSON object that maps the properties in the xhr and options parameters (e.g. { status: xhr.status }).
In
[[Mithril Documentation|http://mithril.js.org/request.html]] documents options.extract to be
This is confusing as what to be returned is a JSON definition and not exactly a string as the example usage suggests,
Expected
Change the output to any and not string
options.extract any = Function(xhr, options)
Description Expected
A hook to specify how the XMLHttpRequest response should be read. Useful for reading response headers and cookies. Defaults to a function that returns a JSON object that maps the properties in the xhr and options parameters (e.g. { status: xhr.status }).