Skip to content

Make WithCustomEndpoint tolerant for missing trailing slash #341

@JiriKovar

Description

@JiriKovar

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions