-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Labels
Description
기본적으로 HTML(Thymeleaf)에서 form태그를 사용하여 데이터를 보낼때 get과 post만 지원함
하지만 아래와 같이 input hidden을 보내면 put을 보낼수 있음
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
<form method="post" th: th:object="${inquiry}">
<input type="hidden" name="_method" value="put" />
<input type="text" th:value="*{title}">
<input type="text" th:value="*{question}">
<input type="text" th:value="*{name}">
<input type="text" th:value="*{password}">
<button type="submit">제출</button>
</form>
</body>
</html>