Skip to content

Fix request url for jsdomClient#251

Open
fdietze wants to merge 1 commit intomasterfrom
fdietze-patch-1
Open

Fix request url for jsdomClient#251
fdietze wants to merge 1 commit intomasterfrom
fdietze-patch-1

Conversation

@fdietze
Copy link
Copy Markdown
Collaborator

@fdietze fdietze commented Aug 24, 2024

The / is already contained in baseUri.

The `/` is already contained in `baseUri`.
override def apply(request: Request[String]): F[String] = for {
config <- config
url = s"${config.baseUri}/${request.method.traitName}/${request.method.methodName}"
url = s"${config.baseUri}${request.method.traitName}/${request.method.methodName}"
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch!

How about we do config.baseUri.trimSuffix("/") to make sure there is non? So that it works when providing a baseUri without a trailing slash.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sounds like too many heuristics for me...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants