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

Improve SetUrl Logic to handle $URL and $URL/. #707

Closed
joshrosso opened this issue Feb 16, 2023 · 3 comments
Closed

Improve SetUrl Logic to handle $URL and $URL/. #707

joshrosso opened this issue Feb 16, 2023 · 3 comments
Labels
feature request New feature or request

Comments

@joshrosso
Copy link

joshrosso commented Feb 16, 2023

Is your feature request related to a problem? Please describe.

As a new user, I struggled to determine why I was getting 404s on my API requests. Turns out, I was setting the URL as:

ac := auth.NewArtifactoryDetails()
ac.SetUrl("https://${ORG_NAME}.jfrog.io/artifactory")

And thus the config was resolving as https://${ORG_NAME}.jfrog.io/artifactoryapi.

I'd expect SetUrl to handle both of these cases:

func (ccf *CommonConfigFields) SetUrl(url string) {
ccf.Url = url
}

Just figured I'd pass this feedback/suggestion on from the perspective of a new user 😃. If it's not desirable behavior for the project, feel free to close.

Thanks for your work on maintaining this library!

@joshrosso joshrosso added the feature request New feature or request label Feb 16, 2023
@joshrosso joshrosso changed the title Improve SetUrl Logic to handle $URI and $URI. Improve SetUrl Logic to handle $URL and $URL/. Feb 16, 2023
@AF250329
Copy link

AF250329 commented Oct 5, 2023

yes... it took me hours to understand why HTTP request fails.... all because of the missing / at the end

@sverdlov93
Copy link
Contributor

Hi @joshrosso @AF250329
Thanks for reporting this issue.
Our apologies for the inconvenience caused by this.
This PR should fix it.
I will update this thread once the next release will be out.

@sverdlov93
Copy link
Contributor

Hi @joshrosso @AF250329
Version 1.36.0 has been released!
We are looking forward to your feedback on it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants