keymetrics / pm2-io-js-api

PM2.io API Client for Javascript
http://docs.api.cloud.pm2.io/index.html
Apache License 2.0
28 stars 13 forks source link

fix: replay request on access token expires #50

Closed BenoitZugmeyer closed 6 years ago

BenoitZugmeyer commented 6 years ago

The HTTP headers were not updated with the new access_token when replaying the request, so the request failed again.

BenoitZugmeyer commented 6 years ago

This line updates the default Authorization header, but this default header is not used since it is provided by the httpOpts object https://github.com/keymetrics/pm2-io-js-api/blob/5cb7e092f67be78cad67ecff7e37678e975dae48/src/network.js#L139