MCPcopy Create free account
hub / github.com/TGX-Android/Publisher / getAppVersion

Function getAppVersion

main.js:524–544  ·  view source on GitHub ↗
(callback)

Source from the content-addressed store, hash-verified

522 const protocol = (parsed.protocol === 'https:' ? https : http);
523
524 const file = fs.createReadStream(filePath);
525 const stat = fs.statSync(filePath);
526
527 const options = Object.assign({
528 host: parsed.host,
529 path: parsed.pathname + parsed.search,
530 method: 'POST',
531 headers: Object.assign({
532 'Content-Type': 'application/octet-stream',
533 'Content-Length': stat.size
534 }, httpHeaders || {})
535 }, httpOptions || {});
536
537 const req = protocol.request(options, (res) => {
538 toUtf8(res, (contentType, content) => {
539 accept({statusCode: res.statusCode, statusMessage: res.statusMessage, content, contentType});
540 }, needBinary);
541 });
542
543 req.on('error', reject);
544 file.pipe(req);
545 });
546}
547

Callers 1

processPrivateCommandFunction · 0.85

Calls 3

getPropertyFunction · 0.85
getCommitDateFunction · 0.85
monthYearsFunction · 0.85

Tested by

no test coverage detected