(method, uriPattern, headers, query)
| 66 | } |
| 67 | |
| 68 | function buildStringToSign(method, uriPattern, headers, query) { |
| 69 | const accept = headers['accept']; |
| 70 | const contentMD5 = headers['content-md5'] || ''; |
| 71 | const contentType = headers['content-type'] || ''; |
| 72 | const date = headers['date'] || ''; |
| 73 | |
| 74 | const header = `${method}\n${accept}\n${contentMD5}\n${contentType}\n${date}\n`; |
| 75 | |
| 76 | const canonicalizedHeaders = getCanonicalizedHeaders(headers); |
| 77 | const canonicalizedResource = getCanonicalizedResource(uriPattern, query); |
| 78 | |
| 79 | return `${header}${canonicalizedHeaders}${canonicalizedResource}`; |
| 80 | } |
| 81 | |
| 82 | function parseXML(xml) { |
| 83 | const parser = new xml2js.Parser({ |
no test coverage detected