All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog and this project adheres to Semantic Versioning.
- [118] Add support for request
Interceptors
.
- [116] Add more support for
Sendable
. - [105] Revamp example project to highlight async/await features, use SwiftUI.
- [104] Add support for partially decoding arrays through new
arrayDecodingStrategy
parameter onRequest
. - [106] Fix
RetryConfiguration
not being marked asSendable
.
- [77] Rework networking to use async/await by default.
- [96] Add support + documentation for basic GraphQL requests.
- [60] Add better handling for printing request bodies to the console, including some default redaction for sensitive parameters.
- [64] Add an alternate
request
format that allows you to use Combine to process results. - [66] Add support for fallback decoding to
NetableError
, allowing you to set a fallback type to try and decode if your first decode toRawResource
fails. - [73] Add more helpful decoding error descriptions
- [74] Change Netable constructor to remove the option to directly set a URLSessionConfiguration and instead only expose the
timeout
option. - [76] Add an option to set json en/decoding strategies in the Netable config constructor in addition to per-request.
- [79] Add
requestFailedDelegate
andrequestFailedPublisher
to users to handle errors globally in addition to inrequest
completion callbacks. Bumps minimum iOS version to 13.0.
- Fixed an issue with logging successful requests that was preventing finalized data from being printed properly.
- Fixed a couple small tpyos.
- Added support for
DELETE
requests.
- Fixed some properties in the new logging not being marked as "public".
- Requests are now automatically retried for (some) failures. The new RetryConfiguration struct controls the exact mechanisms for retrying.
- The NotificationCenter events for request completion have been removed. For global snooping on requests, use a custom LogDestination.
- The names and payload of some of the request related LogEvents have changed, generally to include more data on requests.
- LogEvent.requestCompleted is no longer sent for requests that fail based on non 2xx HTTP codes, just LogEvent.requestFailure. You can check for a NetableError.httpError payload if you want to log the status code or raw data.
- LogDestination is now always called on the main thread
- Default logging now logs URLs on request completion, and logs HTTP status codes for HTTP failures
- Change RequestIdentifier to be opaque
- Fixed build on non-Apple platforms (note: only basic compliation has been tested, still might not work properly)
- Use TimeInterval instead of CFTimeInterval in public interface (shouldn't actually change API, since they are both just Double typedefs)
- Remove not-publically-exposed-and-probably-not-working capability to use encodings other than UTF8 for multipart form requests.
- Added
jsonKeyEncodingStrategy
toRequest
s, allowing custom encoding strategies for request params. - Added
LogEvent.startupInfo
to keep track of some debugging info while booting.
- Changed multi-line logs that weren't printing to the console properly to single liners.
- Changed
LogEvent.message
to accept aStaticString
instead of aString
. - Changed when parameters are checked for nested objects.
- Added a new post example
- Added ability to customize the decode method for requests
- Update file headers, add some more comments to examples
- Reworked the example project to allow for more examples to be added
- Added support for built in logging
- Fixed the unit for network duration
- Added missing error codes
- Lowered minimum iOS target to 11
- Renamed library to Netable
- Consolidated iOS and Mac targets to a single target
- Removed MockingJay and updated unit tests using OHHTTPStubs
- Support for Swift Package Manager
- Users can now pass in a custom url session configuration when initializing
- Updated Request to support a final resource type
- Updated example
- Included a final resource and finalize default implementations
- Added resourceExtractionError type to NetworkAPIError
- Update documentation
- Add
cancel(request)
functionality to cancel specific requests
- Included response data in a http error (can allow clients to display server messages)
- Included response data in a decoding error (can allow clients to handle JSON fragments)
- Multipart form data request
- URL encoded form data request
- Log notifications not fired in some cases of errors or early returns
- Localized descriptions for errors
- Removed Result enum in favour of Swift 5's Result type
- Basic frameworks for iOS and macOS