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

Method post

function/sendNotify.js:2461–2503  ·  view source on GitHub ↗
(t, s = () => {})

Source from the content-addressed store, hash-verified

2459 }, (t) => s(t)));
2460 }
2461 post(t, s = () => {}) {
2462 if ((t.body && t.headers && !t.headers['Content-Type'] && (t.headers['Content-Type'] = 'application/x-www-form-urlencoded'), delete t.headers['Content-Length'], this.isSurge() || this.isLoon()))
2463 $httpClient.post(t, (t, e, i) => {
2464 !t && e && ((e.body = i), (e.statusCode = e.status)),
2465 s(t, e, i);
2466 });
2467 else if (this.isQuanX())
2468 (t.method = 'POST'), $task.fetch(t).then((t) => {
2469 const {
2470 statusCode: e,
2471 statusCode: i,
2472 headers: o,
2473 body: h
2474 } = t;
2475 s(null, {
2476 status: e,
2477 statusCode: i,
2478 headers: o,
2479 body: h
2480 }, h);
2481 }, (t) => s(t));
2482 else if (this.isNode()) {
2483 this.initGotEnv(t);
2484 const {
2485 url: e,
2486 ...i
2487 } = t;
2488 this.got.post(e, i).then((t) => {
2489 const {
2490 statusCode: e,
2491 statusCode: i,
2492 headers: o,
2493 body: h
2494 } = t;
2495 s(null, {
2496 status: e,
2497 statusCode: i,
2498 headers: o,
2499 body: h
2500 }, h);
2501 }, (t) => s(t));
2502 }
2503 }
2504 time(t) {
2505 let s = {
2506 'M+': new Date().getMonth() + 1,

Callers 15

gotifyNotifyFunction · 0.45
gobotNotifyFunction · 0.45
serverNotifyFunction · 0.45
BarkNotifyFunction · 0.45
tgBotNotifyFunction · 0.45
ddBotNotifyFunction · 0.45
qywxBotNotifyFunction · 0.45
fsBotNotifyFunction · 0.45
qywxamNotifyFunction · 0.45
iGotNotifyFunction · 0.45
pushPlusNotifyFunction · 0.45
wxpusherNotifyByOneFunction · 0.45

Calls 6

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

Tested by

no test coverage detected