MCPcopy Create free account
hub / github.com/6dylan6/jdpro / initGotEnv

Method initGotEnv

function/sendNotify.js:2414–2419  ·  view source on GitHub ↗
(t)

Source from the content-addressed store, hash-verified

2412 return this.isSurge() || this.isLoon() ? $persistentStore.write(t, s) : this.isQuanX() ? $prefs.setValueForKey(t, s) : this.isNode() ? ((this.data = this.loaddata()), (this.data[s] = t), this.writedata(), !0) : (this.data && this.data[s]) || null;
2413 }
2414 initGotEnv(t) {
2415 (this.got = this.got ? this.got : require('got')),
2416 (this.cktough = this.cktough ? this.cktough : require('tough-cookie')),
2417 (this.ckjar = this.ckjar ? this.ckjar : new this.cktough.CookieJar()),
2418 t && ((t.headers = t.headers ? t.headers : {}), void 0 === t.headers.Cookie && void 0 === t.cookieJar && (t.cookieJar = this.ckjar));
2419 }
2420 get(t, s = () => {}) {
2421 t.headers && (delete t.headers['Content-Type'], delete t.headers['Content-Length']),
2422 this.isSurge() || this.isLoon() ? $httpClient.get(t, (t, e, i) => {

Callers 2

getMethod · 0.45
postMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected