Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Swap implicit URL building contract in favour of compile-time builder #218

Open
ShezHsky opened this issue Jun 25, 2019 · 1 comment
Open
Labels
technical debt Swapping a short term solution for a more maintainable one

Comments

@ShezHsky
Copy link
Member

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.

@ShezHsky ShezHsky added the technical debt Swapping a short term solution for a more maintainable one label Jun 25, 2019
@ShezHsky
Copy link
Member Author

Alternative approach: APIURLProviding spits out an NSURLComponents

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
technical debt Swapping a short term solution for a more maintainable one
Projects
None yet
Development

No branches or pull requests

1 participant