All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
2.0.1 - 2022-01-17
localBaseURL
option removed
- Fix typo in README on array/object as value for key.
- Fix typo in docs where it said to be using
beforeSend()
return instead ofdynamicOptions()
.
dynamicOptions()
returns dynamic options instead ofbeforeSend()
; acceptsawait
.localBaseURL
option to automatically detect when working locally.- Missing testing.
beforeSend()
callback parameter now has the current URL and all the request options as object parameters.beforeSend()
return is not longer used for dynamic options, as a dedicateddynamicOptions()
function is now used for that.afterSend()
anderrorHandler
acceptawait
.
- Minor typos in
README
and docs.
- Add ability to have
async
beforeSend()
. - Fix minor typo in code where check for headers was before headers getting set
-
Global error handler to catch all exceptions, instead of just response errors.
-
Add ability to use
URLParams
, combined withdata
withPOST
,PUT
,PATCH
-
JSON.stringify
URL query params that have an object or array type as value
- Issue where options set in constructor gets overwritten and add deepMerge. Now it is actually fixed, as the root problem was the initial local variable shallow clone set.
- Issue where options set in constructor gets overwritten and add deepMerge.
- Issue where POST overwrites headers.
- Issue where init options would get cached if not reloaded, due to lodash merge mutating original. New deepmerge fixes this issue.
- Remove
setDefaultOptions()
, in favor of simply returning object onbeforeSend()
.