This repository has been archived by the owner on Sep 30, 2024. It is now read-only.
0.4.0
Added
- Microya now supports Combine publishers, just call
publisher(on:decodeBodyTo:)
orpublisher(on:)
instead ofperformRequest(on:decodeBodyTo:)
orperformRequest(on:)
and you'll get anAnyPublisher
request stream to subscribe to. In success cases you will receive the decoded typed object, in error cases anApiError
object exactly like within theperformRequest
completion closure. But instead of aResult
type you can usesink
orcatch
from the Combine framework.
Changed
- The
queryParameters
is no longer of type[String: String]
, but[String: QueryParameterValue]
now. Existing code like["search": searchTerm]
will need to be updated to["search": .string(searchTerm)]
. Apart from.string
this now also allows specifying an array of strings like so:["tags": .array(userSelectedTags)]
. String & array literals are supported directly, e.g.["sort": "createdAt"]
or["sort": ["createdAt", "id"]]
.