- 
                Notifications
    You must be signed in to change notification settings 
- Fork 37
Open
Description
In
qdrant-js/packages/js-client-rest/src/qdrant-client.ts
Lines 75 to 92 in 6137f26
| } else if (url) { | |
| if (!(url.startsWith('http://') || url.startsWith('https://'))) { | |
| throw new QdrantClientConfigError( | |
| 'The `url` param expected to contain a valid URL starting with a protocol (http:// or https://).', | |
| ); | |
| } | |
| const parsedUrl = new URL(url); | |
| this._host = parsedUrl.hostname; | |
| this._port = parsedUrl.port ? Number(parsedUrl.port) : port; | |
| this._scheme = parsedUrl.protocol.replace(':', ''); | |
| if (this._prefix.length > 0 && parsedUrl.pathname !== '/') { | |
| throw new QdrantClientConfigError( | |
| 'Prefix can be set either in `url` or in `prefix`.\n' + | |
| `url is ${url}, prefix is ${parsedUrl.pathname}`, | |
| ); | |
| } | |
| } else { | 
this._prefix is never set with parsedUrl.pathname.
Consequently, when the argument url has prefix, the prefix will not be passed to
| this._restUri = `${this._scheme}://${address}${this._prefix}`; | 
Metadata
Metadata
Assignees
Labels
No labels