* Ping root url to retrieve node info * @private * @param {Function} cb invoked with where Object is the response sended by the server
(cb)
| 233 | * @param {Function} cb invoked with <Error, Object> where Object is the response sended by the server |
| 234 | */ |
| 235 | _pingRoot (cb) { |
| 236 | const data = this.getSystemMetadata() |
| 237 | |
| 238 | this.httpClient.open({ |
| 239 | url: this.opts.ROOT_URL + '/api/node/verifyPM2', |
| 240 | method: 'POST', |
| 241 | data: { |
| 242 | public_id: this.opts.PUBLIC_KEY, |
| 243 | private_id: this.opts.SECRET_KEY, |
| 244 | data: data |
| 245 | }, |
| 246 | headers: { |
| 247 | 'User-Agent': `PM2 Agent v${pkg.version}` |
| 248 | } |
| 249 | }, cb) |
| 250 | } |
| 251 | |
| 252 | /** |
| 253 | * Ping root to verify retrieve and connect to the km endpoint |
no test coverage detected