diff --git a/src/main/resources/templates/index.html b/src/main/resources/templates/index.html index cedf0e7..7054e8d 100644 --- a/src/main/resources/templates/index.html +++ b/src/main/resources/templates/index.html @@ -143,9 +143,13 @@ } // 단축 URL 생성 요청 및 처리 - var queryUrl="/short?url="+inputUrl; + var queryUrl="/short" fetch(queryUrl,{ - method: "POST" + method: "POST", + headers:{ + "Content-Type": "application/json" + }, + body: JSON.stringify({ originalUrl : inputUrl }) }) .then(response => { if(!response.ok){