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
The APIURLProviding protocol allows injecting a base URL for contacting the backend, however the absence of a trailing slash is an implicit contract all clients of the dependency need to be aware of. This causes breakages when concatenating a path without the slash.
Instead of injecting a value, passing in a factory to give us back a prepared URL for a path moves this knowledge into the dependency and allows clients to not care about the structure of the URL being passed in.
The text was updated successfully, but these errors were encountered:
The
APIURLProviding
protocol allows injecting a base URL for contacting the backend, however the absence of a trailing slash is an implicit contract all clients of the dependency need to be aware of. This causes breakages when concatenating a path without the slash.Instead of injecting a value, passing in a factory to give us back a prepared URL for a path moves this knowledge into the dependency and allows clients to not care about the structure of the URL being passed in.
The text was updated successfully, but these errors were encountered: