Skip to content

[Docs] Form에서 put보내기 #18

@gunwoong1630

Description

@gunwoong1630

기본적으로 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>

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions