borchero / Squid

Declarative and Reactive Networking for Swift.
https://squid.borchero.com
MIT License
71 stars 6 forks source link

Support per-request base URLs #26

Closed aplr closed 3 years ago

aplr commented 3 years ago

Up until now, one was able to define the base url of a request on the service only. If, for whatever reason, the base url for one of the requests is only given at run-time and is absolute, the apiUrl defined on the service has to be removed, which is cumbersome and boilerplate code. Instead, it should be possible to define the full URL on the requests itself, taking precedence over the apiUrl defined on the service. This PR adds this functionality to Squid.

Additionally, this PR adds conformance to the UrlConvertible protocol to Optional and Array types.

Furthermore, the deprecated class conformance of both HttpTaskSubscriptionDelegate and WSTaskSubscriptionDelegate was replaced by AnyObject, as suggested here.