-
Notifications
You must be signed in to change notification settings - Fork 24
Open
Description
Hi, thanks for this client package.
We are experiencing an issue with passing extra headers at the trinoClient.query({...}) stage. When we create the client with the extra headers, everything works as expected. However, the issue arises when we attempt to pass the extra headers in the query() call; something happens along the way, and this parameter is either ignored or overwritten.
Everything works:
const trinoClient = Trino.create({
server: url,
extraHeaders: {
'X-extra-header': 'example-header-value'
}
});
trinoClient.query({query: '...'});
Extra headers are ignored/overwritten:
const trinoClient = Trino.create({
server: url
});
trinoClient.query({query: '...', extraHeaders: {'X-extra-header': 'example-header-value'}});
The extra header is dynamic value, so we can't use it once on the client creation; in addition we don't want to create a new client on every query. BTW, everything works as expected in the python client package.
Thanks
Metadata
Metadata
Assignees
Labels
No labels