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

0.3.0

Compare
Choose a tag to compare
@Jeehut Jeehut released this 03 Nov 07:37
· 72 commits to main since this release

Added

  • New ApiProvider type encapsulating different request methods with support for plugins.
  • New asynchronous performRequest methods with completion callbacks. (#2)
  • New Plugin class to subclass for integrating into the networking logic via callbacks.
  • New pre-implemented plugins: HttpBasicAuth, ProgressIndicator, RequestLogger, ResponseLogger.
  • New EmptyResponseBody type to use whenever the body is expected to be empty or should be ignored.

Changed

  • Renamed JsonApi protocol to Endpoint.
  • Renamed Method to HttpMethod and added body: Data to the cases post and patch.
  • Moved the request method from JsonApi to the new ApiProvider & renamed to performRequestAndWait.
  • Generally improved the cases in JsonApiError & renamed the type to ApiError.
  • Moved CI from Bitrise to GitHub Actions.

Removed

  • The bodyData: Data? requirement on JsonApi (bodies are not part of HttpMethod, see above).
  • Installation is no longer possible via CocoaPods or Carthage. Please use SwiftPM instead.