MCPcopy
hub / github.com/scality/cloudserver / makeBackbeatRequest

Function makeBackbeatRequest

tests/functional/raw-node/utils/makeRequest.js:204–219  ·  view source on GitHub ↗

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.objectKey - object key * @par

(params, callback)

Source from the content-addressed store, hash-verified

202 * @return {undefined} - and call callback
203 */
204function makeBackbeatRequest(params, callback) {
205 const { method, headers, bucket, objectKey, resourceType,
206 authCredentials, requestBody, queryObj } = params;
207 const options = {
208 authCredentials,
209 hostname: ipAddress,
210 port: 8000,
211 method,
212 headers,
213 path: `/_/backbeat/${resourceType}/${bucket}/${objectKey}`,
214 requestBody,
215 jsonResponse: true,
216 queryObj,
217 };
218 makeRequest(options, callback);
219}
220
221module.exports = {
222 makeRequest,

Callers

nothing calls this directly

Calls 1

makeRequestFunction · 0.70

Tested by

no test coverage detected