(t, s = () => {})
| 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, |
no test coverage detected