Skip to content
This repository has been archived by the owner on Sep 30, 2024. It is now read-only.

0.5.0

Compare
Choose a tag to compare
@Jeehut Jeehut released this 28 Sep 11:53
· 46 commits to main since this release

Added

  • New mockingBehavior parameter on ApiProvider for testing purposes. Specify one with delay and scheduler, e.g. .seconds(0.5) and DispatchQueue.main.eraseToAnyScheduler(). Provides nil by default to make actual requests.
  • New optional mockedResponse computed property on Endpoint protocol expecting an output of type MockedResponse. Use this to provide mocked responses when using a mockingBehavior in tests. See the PostmanEchoEndpoint in the tests for a usage example via the mock convenience method.

Changed

  • Moved baseUrl from Endpoint to ApiProvider. This allows for specifying different baseUrl even when Endpoint is implemented in a library by passing it in the app.
  • Renamed HttpBasicAuthPlugin to HttpAuthPlugin with a new scheme parameter that accepts one of .basic or .bearer to support multiple authentication methods.