From 15e8bcede8880a6c1980a67f5546d1bb47e14008 Mon Sep 17 00:00:00 2001 From: kric_jspark Date: Mon, 28 Sep 2026 12:15:53 +0900 Subject: [PATCH] =?UTF-8?q?260928=5F02=5FENH:=20kon,=20kiwi=20api=20?= =?UTF-8?q?=EC=9A=94=EC=B2=AD=20=EB=B0=8F=20=EC=84=B1=EA=B3=B5,=20?= =?UTF-8?q?=EC=8B=A4=ED=8C=A8=20=EB=A1=9C=EA=B7=B8=20=EC=B6=94=EA=B0=80=20?= =?UTF-8?q?=EB=A1=A4=EB=B0=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../contactsurvey/ContactSurveyApiClient.java | 23 ++----------------- 1 file changed, 2 insertions(+), 21 deletions(-) diff --git a/src/main/java/com/kri/contact/server/common/external/contactsurvey/ContactSurveyApiClient.java b/src/main/java/com/kri/contact/server/common/external/contactsurvey/ContactSurveyApiClient.java index 72915cd..d5ae1ee 100644 --- a/src/main/java/com/kri/contact/server/common/external/contactsurvey/ContactSurveyApiClient.java +++ b/src/main/java/com/kri/contact/server/common/external/contactsurvey/ContactSurveyApiClient.java @@ -4,13 +4,11 @@ import com.kri.common.feature.http.ExternalApiClient; import com.kri.common.feature.http.ExternalApiResponse; import com.kri.common.feature.web.BusinessException; import com.kri.contact.server.common.enums.SurveyType; -import java.net.URI; import java.net.URLEncoder; import java.nio.charset.StandardCharsets; import java.util.HashMap; import java.util.Locale; import java.util.Map; -import java.util.concurrent.TimeUnit; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Value; import org.springframework.core.env.Environment; @@ -66,30 +64,13 @@ public class ContactSurveyApiClient { validate(pkey, psidx); String url = baseUrl(surveyType) + CONTACT_SURVEY_PATH; - String target = target(); String body = "CRUD=" + crud + "&COMMAND=" + CONTACT_SURVEY_COMMAND + "&PKEY=" + encode(pkey) + "&PSIDX=" + psidx - + "&TARGET=" + target; + + "&TARGET=" + target(); - String host = URI.create(url).getHost(); - log.info("ContactSurvey API request surveyType={} crud={} target={} host={} path={}", - surveyType, crud, target, host, CONTACT_SURVEY_PATH); - long startedAt = System.nanoTime(); - try { - ExternalApiResponse response = externalApiClient.post(url, headers(), body); - log.info("ContactSurvey API response surveyType={} crud={} target={} host={} status={} elapsedMs={}", - surveyType, crud, target, host, response.getStatusCode(), - TimeUnit.NANOSECONDS.toMillis(System.nanoTime() - startedAt)); - } catch (RuntimeException e) { - Throwable cause = e.getCause(); - log.warn("ContactSurvey API failure surveyType={} crud={} target={} host={} errorType={} causeType={} elapsedMs={}", - surveyType, crud, target, host, e.getClass().getSimpleName(), - cause == null ? "none" : cause.getClass().getSimpleName(), - TimeUnit.NANOSECONDS.toMillis(System.nanoTime() - startedAt)); - throw e; - } + externalApiClient.post(url, headers(), body); } private String baseUrl(SurveyType surveyType) {