MCPcopy Create free account
hub / github.com/Semporia/Scripts / get

Method get

jd_superMarket.js:2282–2305  ·  view source on GitHub ↗
(t, e = (() => {
    }))

Source from the content-addressed store, hash-verified

2280 }
2281
2282 get(t, e = (() => {
2283 })) {
2284 t.headers && (delete t.headers["Content-Type"], delete t.headers["Content-Length"]), this.isSurge() || this.isLoon() ? (this.isSurge() && this.isNeedRewrite && (t.headers = t.headers || {}, Object.assign(t.headers, {"X-Surge-Skip-Scripting": !1})), $httpClient.get(t, (t, s, i) => {
2285 !t && s && (s.body = i, s.statusCode = s.status), e(t, s, i)
2286 })) : this.isQuanX() ? (this.isNeedRewrite && (t.opts = t.opts || {}, Object.assign(t.opts, {hints: !1})), $task.fetch(t).then(t => {
2287 const {statusCode: s, statusCode: i, headers: r, body: o} = t;
2288 e(null, {status: s, statusCode: i, headers: r, body: o}, o)
2289 }, t => e(t))) : this.isNode() && (this.initGotEnv(t), this.got(t).on("redirect", (t, e) => {
2290 try {
2291 if (t.headers["set-cookie"]) {
2292 const s = t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();
2293 s && this.ckjar.setCookieSync(s, null), e.cookieJar = this.ckjar
2294 }
2295 } catch (t) {
2296 this.logErr(t)
2297 }
2298 }).then(t => {
2299 const {statusCode: s, statusCode: i, headers: r, body: o} = t;
2300 e(null, {status: s, statusCode: i, headers: r, body: o}, o)
2301 }, t => {
2302 const {message: s, response: i} = t;
2303 e(s, i, i && i.body)
2304 }))
2305 }
2306
2307 post(t, e = (() => {
2308 })) {

Callers 15

receiveBlueCoinFunction · 0.45
smtgSignFunction · 0.45
smtg_shopIndexFunction · 0.45
smtg_shelfUnlockFunction · 0.45
smtg_shelfUpgradeFunction · 0.45
smtg_sellMerchandiseFunction · 0.45
updatePkActivityIdFunction · 0.45
updatePkActivityIdCDNFunction · 0.45
smtgDoShopTaskFunction · 0.45
smtgObtainShopTaskPrizeFunction · 0.45
smtgQueryShopTaskFunction · 0.45
smtgSignListFunction · 0.45

Calls 7

eFunction · 0.70
isSurgeMethod · 0.45
isLoonMethod · 0.45
isQuanXMethod · 0.45
isNodeMethod · 0.45
initGotEnvMethod · 0.45
logErrMethod · 0.45

Tested by

no test coverage detected