All notable changes to this project will be documented in this file
- Made variables under
NetswiftNetworkPerformer
&NetswiftHTTPPerformer
public
- Netswift now supports
Async/Await
, implemented by @Deco354 - [BREAKING] NetswiftRequestPerformable now has an additional requirement so that they can be performed with a time-out.
NetswiftHTTPMethod.head
, a convenience accessor forHEAD
http methods.NetswiftRequest.curl
, a conveniencecURL
string generator for any request.
- Made variables & constructor under
NetswiftHTTPResponse
public.
- Marked
NetswiftRequest.body(_:)
asthrows -> Data?
- New
NetswiftEncoder
wrapper protocol for types such asJSONEncoder
orPropertyListEncoder
(those 2 are already made to conform toNetswiftEncoder
)
NetswiftRequest
now has new requirements:- A
bodyEncoder: NetswiftEncoder?
var, which can be used to encode any data into the request'shttpBody
; - A
body(encodedBy encoder: NetswiftEncoder?) -> Data?
function that uses the given encoder to returnData?
, if applicable.
- A
- HTTP Status Codes are now included in
NetswiftError.Category
NetswiftError.Category
now conforms toCustomDebugStringConvertible
NetswiftError
has been refactored to always keep track of a network task's response payload, if any is available.NetswiftRequest
are now given a chance to intercept and handle aNetswiftError
when performed.
- Access control levels for
NetswiftHTTPPerformer
andNetswiftPerformer
have been set toopen
to allow for overriding and extending.
- New Changelog file to keep track of updates!
- JPEG Mime Type
NetswiftError
now conforms toEquatable
- Updated Readme to remove some deprecated stuff
- Renamed
MimeType.plainText
toMimeType.text
- Access control for several classes has been made public
- Fixed a typo for the
.mailto
Generic Scheme's rawValue - Added missing headers in default implementation of
NetswiftRequest.serialise()
- Use default SPM Platform requirements