Skip to content

1.0.0

Choose a tag to compare

@diegollopis diegollopis released this 07 Jul 01:00

Initial release of Kuang — a small, protocol-oriented networking layer for Swift (iOS 15+, macOS 12+).

  • Endpoint-driven — describe an API as an enum conforming to EndpointProtocol; HTTPClient builds and executes the URLRequest with async/await
  • Typed responses — decoded with a configurable JSONDecoder; transport and HTTP failures map to a single NetworkError type
  • Pluggable authorization.none / .bearerToken / .custom(_:) per endpoint; BearerTokenAuthorizationProvider reads the token lazily on each request
  • Interceptorsadapt/retry hooks via NetworkInterceptorProtocol, with a built-in RetryInterceptor for transient failures
  • Pluggable loggingNetworkLoggingProtocol, shipping ConsoleNetworkLogger and DisabledNetworkLogger
  • Server error messagesErrorMessageParsingProtocol extracts them into localizedDescription; error strings localized in English and Brazilian Portuguese
  • Testable without the network — inject a fake session through the client's session protocol