Closed thomashacker closed 1 year ago
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.
beep boop - the Weaviate bot 👋🤖
PS:
Are you already a member of the Weaviate Slack channel?
I agree,
As far as I can see, the scheme
parameter is only being used to build the baseURL
for both the HTTPClient
and GQLClient
. As you suggested, If the scheme is already present in the host, we can make specifying the scheme optional.
I would also move the whole scheme
/host
processing upwards, I'll look into it!
Made the scheme
parameter optional and removed throw error
when it doesn't exist
Moved schema
and host
checks to Connection
, adding following unit tests:
Both the HttpClient
and GQLClient
are now using params.host
parameter + adding their prefixes
This
PR
aims to fix https://github.com/weaviate/typescript-client/issues/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.