From 11d5f2aa1f45262606ed628b042693aee352fe11 Mon Sep 17 00:00:00 2001 From: Lkeme <19500576+lkeme@users.noreply.github.com> Date: Sat, 3 Apr 2021 17:17:50 +0800 Subject: [PATCH] [update] Notice --- src/core/Curl.php | 2 ++ src/plugin/Notice.php | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/core/Curl.php b/src/core/Curl.php index 65f356e..cd47744 100644 --- a/src/core/Curl.php +++ b/src/core/Curl.php @@ -192,8 +192,10 @@ class Curl // var_dump($e->getRequest()); if ($e->hasResponse()) var_dump($e->getResponse()); } catch (\Exception $e) { + // $e->getHandlerContext() // var_dump($e); } + Log::warning("Target -> URL: {$url} METHOD: {$method}"); Log::warning("CURl -> RETRY: {$retry} ERROR: {$e->getMessage()} ERRNO: {$e->getCode()} STATUS: Waiting for recovery!"); sleep(15); } diff --git a/src/plugin/Notice.php b/src/plugin/Notice.php index 492d5fb..30b9374 100644 --- a/src/plugin/Notice.php +++ b/src/plugin/Notice.php @@ -320,7 +320,7 @@ class Notice 'user_id' => getenv('NOTIFY_CQ_QQ'), 'message' => $info['content'] ]; - $raw = Curl::post('other', $url, $payload); + $raw = Curl::get('other', $url, $payload); // {"data":{"message_id":123456},"retcode":0,"status":"ok"} $de_raw = json_decode($raw, true); if ($de_raw['retcode'] == 0) {