This PR changes how the fetchResponse helper works by returning the Response object instead of mapping it to Unit. This lets consumers use all the Response state to make additional logic decisions.
It also makes all the error handlers callbacks for async operations optionally async.
Finally, some missing tests were added for ResultAsync.try, and the fetchResponse/fetchJsonResponse helpers. There are still more test cases that need to be added for async error handlers, but there are no regressions with existing functionality, so the additional tests can wait for a later PR.
Because of the change to fetchResponse, this will result in a major version bump to 2.0.0.
This PR changes how the
fetchResponse
helper works by returning theResponse
object instead of mapping it toUnit
. This lets consumers use all theResponse
state to make additional logic decisions.It also makes all the error handlers callbacks for async operations optionally async.
Finally, some missing tests were added for
ResultAsync.try
, and thefetchResponse
/fetchJsonResponse
helpers. There are still more test cases that need to be added for async error handlers, but there are no regressions with existing functionality, so the additional tests can wait for a later PR.Because of the change to
fetchResponse
, this will result in a major version bump to2.0.0
.