From a01fafbf5497f2e1703e1990ff4d32cacf83eb5c Mon Sep 17 00:00:00 2001 From: Jae_Philip_Yang Date: Fri, 21 Mar 2025 02:28:35 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20HEAD=EB=A9=94=EC=84=9C=EB=93=9C=20ping?= =?UTF-8?q?=20endpoint=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/http/handler/pinghandler.go | 4 ++++ internal/http/router/router.go | 1 + 2 files changed, 5 insertions(+) diff --git a/internal/http/handler/pinghandler.go b/internal/http/handler/pinghandler.go index fa413fe..7bd4ad8 100644 --- a/internal/http/handler/pinghandler.go +++ b/internal/http/handler/pinghandler.go @@ -5,3 +5,7 @@ import "github.com/gin-gonic/gin" func PingPong(context *gin.Context) { context.String(200, "pong\n") } + +func DoNothing(context *gin.Context) { + context.Status(200) +} diff --git a/internal/http/router/router.go b/internal/http/router/router.go index c016bd1..0ccf82a 100644 --- a/internal/http/router/router.go +++ b/internal/http/router/router.go @@ -9,6 +9,7 @@ import ( func InitRouter(r *gin.Engine, client *ent.Client) { // PingPong 테스트 r.GET("/ping", handler.PingPong) + r.HEAD("/ping", handler.DoNothing) // 회사 리스트 조회 // curl -X GET http://localhost:8080/companies