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

Method get

jd_pk.js:939–989  ·  view source on GitHub ↗
(t, e = (() => {
        }))

Source from the content-addressed store, hash-verified

937 }
938
939 get(t, e = (() => {
940 })) {
941 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, {
942 "X-Surge-Skip-Scripting": !1
943 })), $httpClient.get(t, (t, s, i) => {
944 !t && s && (s.body = i, s.statusCode = s.status), e(t, s, i)
945 })) : this.isQuanX() ? (this.isNeedRewrite && (t.opts = t.opts || {}, Object.assign(t.opts, {
946 hints: !1
947 })), $task.fetch(t).then(t => {
948 const {
949 statusCode: s,
950 statusCode: i,
951 headers: r,
952 body: o
953 } = t;
954 e(null, {
955 status: s,
956 statusCode: i,
957 headers: r,
958 body: o
959 }, o)
960 }, t => e(t))) : this.isNode() && (this.initGotEnv(t), this.got(t).on("redirect", (t, e) => {
961 try {
962 if (t.headers["set-cookie"]) {
963 const s = t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();
964 this.ckjar.setCookieSync(s, null), e.cookieJar = this.ckjar
965 }
966 } catch (t) {
967 this.logErr(t)
968 }
969 }).then(t => {
970 const {
971 statusCode: s,
972 statusCode: i,
973 headers: r,
974 body: o
975 } = t;
976 e(null, {
977 status: s,
978 statusCode: i,
979 headers: r,
980 body: o
981 }, o)
982 }, t => {
983 const {
984 message: s,
985 response: i
986 } = t;
987 e(s, i, i && i.body)
988 }))
989 }
990
991 post(t, e = (() => {
992 })) {

Callers 15

jsonpMethod · 0.45
getBodyFunction · 0.45
initFunction · 0.45
TotalBeanFunction · 0.45
jsonpMethod · 0.45
checkRiskFunction · 0.45
getUserFriendsPageFunction · 0.45
getScoreFunction · 0.45
randomStrFunction · 0.45
getBoxRewardInfoFunction · 0.45
sendBoxRewardFunction · 0.45
getScriptMethod · 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