polygon-io / client-js

The official JS client library for the Polygon REST and WebSocket API.
MIT License
190 stars 59 forks source link

Switch to Authorization header #126

Closed teambailey closed 1 year ago

teambailey commented 1 year ago

For security reasons the API key should be passed via the Authorization header instead of by url query parameter. This pr updates the fetch call to include said header.

timetraveler328 commented 1 year ago

I've pulled these changes into the 7.0.0 branch and created tests for the optional parameter condition that broke tests with this change. Closing this PR in favor of the major release due to that issue.