makeBackbeatRequest - utility function to generate a request going * through backbeat route * @param {object} params - params for making request * @param {string} params.method - request method * @param {string} params.bucket - bucket name * @param {string} params.subCommand - subcommand to bac
(params, callback)
| 69 | * @return {undefined} - and call callback |
| 70 | */ |
| 71 | function makeBackbeatRequest(params, callback) { |
| 72 | const { method, headers, bucket, authCredentials, queryObj } = params; |
| 73 | const options = { |
| 74 | hostname: ipAddress, |
| 75 | port: 8000, |
| 76 | method, |
| 77 | headers, |
| 78 | authCredentials, |
| 79 | path: `/_/backbeat/lifecycle/${bucket}`, |
| 80 | jsonResponse: true, |
| 81 | queryObj, |
| 82 | }; |
| 83 | makeRequest(options, callback); |
| 84 | } |
| 85 | |
| 86 | module.exports = { |
| 87 | makeBackbeatRequest, |
no test coverage detected