You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Both Getable and Postable have methods that conveniently receives a url as String. The problem with this is that any object that adopts those protocols will have to add those methods as wells, and we can't be sure they will implement the right way - just validate the url and call the version with url: URl.
We could just create extensions to the protocols with those convenient methods implemented like so:
Both Getable and Postable have methods that conveniently receives a url as String. The problem with this is that any object that adopts those protocols will have to add those methods as wells, and we can't be sure they will implement the right way - just validate the url and call the version with
url: URl
.We could just create extensions to the protocols with those convenient methods implemented like so:
That way the client can still use URL as strings and we are sure it behaves correctly.
The text was updated successfully, but these errors were encountered: