Skip to content

New Response Serialization System

Pre-release
Pre-release
Compare
Choose a tag to compare
@cnoon cnoon released this 22 Sep 03:46
· 1006 commits to master since this release

All issues associated with this milestone can be found using this filter.

Added

  • A new Response struct to simplify response serialization.
  • A new initializer to the Manager allowing dependency injection of the
    underlying NSURLSession.
  • Tests around the new Manager initialization methods.

Updated

  • Result type to take two generic parameters (Value and Error) where Error
    conforms to ErrorType.
  • All response serializers to now return the original server data as NSData?.
  • The TaskDelegate to store an error as an NSError instead of ErrorType.
  • The ValidationResult failure case to require an NSError instead of ErrorType.
  • All tests around response serialization and Result type usage.
  • All response serializers to use the new Response type.
  • The designated initializer for a Manager to accept a SessionDelegate parameter
    allowing dependency injection for better background session support.