Get 2.0 (Beta 1)
Pre-release
Pre-release
This release is a quick follow-up to Get 1.0 that fixes some of the shortcomings of the original design of the Request type.
Requestcan now be initialized with either a string (path: String) or a URL (url: URL)- Replace separate
.get(...),.post(...), and other factory methods with a singleHTTPMethodtype. Example:Request(path: "/user", method: .patch) - The first parameter in the
Requestinitializer is nowpathorurl, notmethodthat has a default value - Add a new
Requestinitializer that defaults to theVoidresponse type unless you specify it explicitly - Make
bodyproperty ofRequestwritable - Add
upload(for:data:)method - #50, thanks to @soemarko - Replace
APIDelegateclient(_:makeURLFor:query:)method withclient(_:makeURLForRequest:)so that you have complete access to theRequest - Remove APIs deprecated in Get 1.0
See #51 for the reasoning behind the
Requestchanges