MCPcopy Create free account
hub / github.com/aliyun/openapi-core-nodejs-sdk / getCanonicalizedResource

Function getCanonicalizedResource

lib/roa.js:52–66  ·  view source on GitHub ↗
(uriPattern, query)

Source from the content-addressed store, hash-verified

50}
51
52function getCanonicalizedResource(uriPattern, query) {
53 const keys = Object.keys(query).sort();
54
55 if (keys.length === 0) {
56 return uriPattern;
57 }
58
59 var result = [];
60 for (var i = 0; i < keys.length; i++) {
61 const key = keys[i];
62 result.push(`${key}=${query[key]}`);
63 }
64
65 return `${uriPattern}?${result.join('&')}`;
66}
67
68function buildStringToSign(method, uriPattern, headers, query) {
69 const accept = headers['accept'];

Callers 2

buildStringToSignFunction · 0.85
roa.test.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected