From 981eff758a39cb3f8fadabd229a8c6985fc67257 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=B5=9C=EC=A4=80=ED=9D=A0?= Date: Fri, 13 Sep 2024 11:09:07 +0900 Subject: [PATCH] Automation init...3 --- app/Libraries/MySocket/WebLibrary.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/app/Libraries/MySocket/WebLibrary.php b/app/Libraries/MySocket/WebLibrary.php index ccd2c30..9975e55 100644 --- a/app/Libraries/MySocket/WebLibrary.php +++ b/app/Libraries/MySocket/WebLibrary.php @@ -67,11 +67,12 @@ class WebLibrary extends MySocketLibrary } log_message("debug", "Socket URL-> " . $url); $response = $this->getClient()->get($url, $options); - if ($response->getStatusCode() != 200) { + if ($response->getStatusCode() == 200) { + return $response->getBody()->getContents(); + // return $response->getBody(); + } else { throw new \Exception("error", "{$url} 접속실패: " . $response->getStatusCode()); } - // return $response->getBody()->getContents(); - return $response->getBody(); } // 로그인 메서드