This repository has been archived by the owner on Sep 30, 2024. It is now read-only.
0.5.0
Added
- New
mockingBehavior
parameter onApiProvider
for testing purposes. Specify one withdelay
andscheduler
, e.g..seconds(0.5)
andDispatchQueue.main.eraseToAnyScheduler()
. Providesnil
by default to make actual requests. - New optional
mockedResponse
computed property onEndpoint
protocol expecting an output of typeMockedResponse
. Use this to provide mocked responses when using amockingBehavior
in tests. See the PostmanEchoEndpoint in the tests for a usage example via themock
convenience method.
Changed
- Moved
baseUrl
fromEndpoint
toApiProvider
. This allows for specifying differentbaseUrl
even whenEndpoint
is implemented in a library by passing it in the app. - Renamed
HttpBasicAuthPlugin
toHttpAuthPlugin
with a newscheme
parameter that accepts one of.basic
or.bearer
to support multiple authentication methods.