-
Notifications
You must be signed in to change notification settings - Fork 25
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
Handle existing scheme in host #88
Handle existing scheme in host #88
Conversation
To avoid any confusion in the future about your contribution to Weaviate, we work with a Contributor License Agreement. If you agree, you can simply add a comment to this PR that you agree with the CLA so that we can merge. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR @thomashacker 😁
Shall we make the config.host
parameter optional now that users are free to supply it within the host? Then the scheme would be pulled out of config.host
by splitting the string on ://
. If they don't provide config.scheme
and it cannot be found in config.host
, then an error is thrown.
I'm wondering if it would ever be confusing for users coming from Python to specify the URL in config.host
including the protocol only to then have to specify it in config.scheme
also. What do you think?
I agree, As far as I can see, the I would also move the whole |
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM otherwise :)
This
PR
aims to fix #87 and adds a simple check before creating thebaseUrl
This allows users to use a host URL with a scheme if it matches the specified scheme.
The PR also adds two unit tests to verify that it constructs the correct URLs.