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

Fix request url for jsdomClient #251

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Fix request url for jsdomClient #251

wants to merge 1 commit into from

Conversation

fdietze
Copy link
Collaborator

@fdietze fdietze commented Aug 24, 2024

The / is already contained in baseUri.

The `/` is already contained in `baseUri`.
@@ -19,7 +19,7 @@ object HttpRpcTransport {
def apply[F[_]: Async](config: F[HttpRequestConfig]): RequestTransport[String, F] = new RequestTransport[String, F] {
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
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
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