250x250
Notice
Recent Posts
Recent Comments
- Today
- Total
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 | 29 |
30 | 31 |
Tags
- flutter
- Express
- clipBehavior
- nginx
- til
- Find
- async
- sequelize
- EC2
- mongoose
- await
- certbot
- mongodb
- MYSQL
- Node.js
- atlas
- css
- double quote
- JavaScript
- moment
- jsonwebtoken
- TypeScript
- https
- single quote
- TailwindCSS
- AWS
- wil
- findByIdAndDelete
- Nodejs
- RDS
Link
Archives
반응형
목록urlencoded (1)
기억 휘발 방지소

📌 POST 요청 보내기 form(method="POST", action="/post/edit") input(name="title", placeholder="Title", required) input(value="Save", type="submit") pug로 만든 간단한 form이다. 실행하면 아래처럼 나온다. 입력을 하고 Save버튼을 누르면 /post/edit으로 전송한다. (단, form으로 전송할 때에는 input에 반드시 name이 있어야한다) console.log(req.body); // undefined 콘솔로 찍어보면 undefined가 뜬다. 📌 urlencoded app.js에서 라우터 위에 아래코드를 작성해주면 콘솔로 찍었을 때 브라우저에서 입력한 값을 제대로 나온다. extende..
Web/Node.js
2021. 9. 16. 22:39
반응형