Deprecation of modification by reference
Main change (potentially breaking)
before
and beforeRequest
will now require their respective objects (params
and request
) to be returned if any modifications are to be passed on, instead of allowing modification by reference without having to return them.
This will throw an error in development mode, otherwise a console warning will be logged instead.
Other changes
url
in global configuration will now invoke the same deprecation behaviour (error in development mode, console warn otherwise), in favour ofbaseUrl
.afterHeaders
will check if the returned value is an object, (error in development mode, console warn otherwise).