MCPcopy Create free account
hub / github.com/Toulu-debug/enen / post

Method post

sendNotify.js:1025–1043  ·  view source on GitHub ↗
(t, e = (() => {
    }))

Source from the content-addressed store, hash-verified

1023 }
1024
1025 post(t, e = (() => {
1026 })) {
1027 if (t.body && t.headers && !t.headers["Content-Type"] && (t.headers["Content-Type"] = "application/x-www-form-urlencoded"), t.headers && 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.post(t, (t, s, i) => {
1028 !t && s && (s.body = i, s.statusCode = s.status), e(t, s, i)
1029 }); else if (this.isQuanX()) t.method = "POST", this.isNeedRewrite && (t.opts = t.opts || {}, Object.assign(t.opts, {hints: !1})), $task.fetch(t).then(t => {
1030 const {statusCode: s, statusCode: i, headers: r, body: o} = t;
1031 e(null, {status: s, statusCode: i, headers: r, body: o}, o)
1032 }, t => e(t)); else if (this.isNode()) {
1033 this.initGotEnv(t);
1034 const {url: s, ...i} = t;
1035 this.got.post(s, i).then(t => {
1036 const {statusCode: s, statusCode: i, headers: r, body: o} = t;
1037 e(null, {status: s, statusCode: i, headers: r, body: o}, o)
1038 }, t => {
1039 const {message: s, response: i} = t;
1040 e(s, i, i && i.body)
1041 })
1042 }
1043 }
1044
1045 time(t, e = null) {
1046 const s = e ? new Date(e) : new Date;

Callers 11

serverNotifyFunction · 0.45
serverWecomNotifyFunction · 0.45
tgBotNotifyFunction · 0.45
ddBotNotifyFunction · 0.45
qywxBotNotifyFunction · 0.45
qywxamNotifyFunction · 0.45
iGotNotifyFunction · 0.45
pushPlusNotifyFunction · 0.45
wxpusherFunction · 0.45
runScriptMethod · 0.45
msgMethod · 0.45

Calls 6

eFunction · 0.50
isSurgeMethod · 0.45
isLoonMethod · 0.45
isQuanXMethod · 0.45
isNodeMethod · 0.45
initGotEnvMethod · 0.45

Tested by

no test coverage detected