delivery-sdk-net
delivery-sdk-net copied to clipboard
Make WithCustomEndpoint tolerant for missing trailing slash
Motivation
In the unit tests in DeliveryOptionsBuilderTests we don't use trailing slashed for custom endpoints, but without a trailing slash, the URL is constructed incorrectly. Which makes it confusing and the error messages are not great enough to explain what was wrong, so you need to debug the issue to figure out what is wrong, which is tedious.
Proposed solution
In our internal code, we are tolerant to missing trailing slashes when building a URL. We should provide the customers of our SDKs with the same luxury.
Additional context
I have personally misguided a customer in an intercom conversation to use the custom domain, because I took an example from the unit tests, then we spent some time sending messages back and forth to figure out what was wrong and this improvement would probably take less time then we have spent on it.
Hi @JiriKovar, thanks for the suggestion. We will take it as possible minor improvement.
Related t #268