MCPcopy
hub / github.com/meteor/meteor / getUserAgent

Function getUserAgent

tools/utils/http-helpers.js:96–112  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

94
95// Compose a User-Agent header.
96var getUserAgent = function () {
97 var version;
98
99 if (release.current) {
100 version = release.current.isCheckout() ? 'checkout' : release.current.name;
101 } else {
102 // This happens when we haven't finished starting up yet (say, the
103 // user passed --release 1.2.3 and we have to download 1.2.3
104 // before we can get going), or if we are using an installed copy
105 // of Meteor to 'meteor update'ing a project that was created by a
106 // checkout and doesn't have a version yet.
107 version = files.inCheckout() ? 'checkout' : files.getToolsVersion();
108 }
109
110 return util.format('Meteor/%s OS/%s (%s; %s; %s;)', version,
111 os.platform(), os.type(), os.release(), os.arch());
112};
113
114
115var httpHelpers = exports;

Callers 1

http-helpers.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…