tagomoris / presto-client-node

Distributed query engine Presto client library for node.js
MIT License
126 stars 57 forks source link

Simplify setting up Header objects #85

Closed MasterOdin closed 7 months ago

MasterOdin commented 7 months ago

PR modifies the headers.js file so that the header objects are generated from shared array of values, so that adding a new header is only done once, vs twice, to avoid duplication and potential mispellings and such. I also rewrote the overall object to be a regular object instead of a function with additional properties, as the latter struck me as a bit odd / unnecessary vs just using a regular object.

This is a prep PR for adding additional header values (e.g. language, role) that the adapter currently does not support.

tagomoris commented 7 months ago

👍