Skip to content

Netswift v0.5.0 - Request Body

Compare
Choose a tag to compare
@MrSkwiggs MrSkwiggs released this 20 Aug 12:39
b32d34a

[0.5.0 (20210820)]

Added

  • New NetswiftEncoder wrapper protocol for types such as JSONEncoder or PropertyListEncoder (those 2 are already made to conform to NetswiftEncoder)

Changed

  • NetswiftRequest now has new requirements:
    • A bodyEncoder: NetswiftEncoder? var, which can be used to encode any data into the request's httpBody;
    • A body(encodedBy encoder: NetswiftEncoder?) -> Data? function that uses the given encoder to return Data?, if applicable.