Notice
Recent Posts
Recent Comments
Link
| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 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 |
Tags
- Dinosaur
- nestjs
- JavaScript
- GIT
- react
- flask
- Sequelize
- cookie
- MongoDB
- TypeScript
- dfs
- Queue
- 자료구조
- Nest.js
- Bull
- game
- class
- AWS
- MySQL
- mongoose
- jest
- typeORM
- 공룡게임
- nodejs
- 정렬
- 게임
- Express
- Python
- OCR
Archives
- Today
- Total
포시코딩
axios GET 요청 request 데이터 받기 본문
728x90
axios.get('/test', {
params: {key: value},
}).then((res)=>{
보낼 데이터를 params: {} 로 감싸서 보낸다.
app.get('/test', (req, res) => {
// const client = req.body;
const client = req.query;
console.log(client);
});
post일 때의 받는 req.body가 아닌 req.query를 통해 받으면 된다.
728x90
'Node.js' 카테고리의 다른 글
| Express + mongoose(몽구스) 사용법 (0) | 2022.11.14 |
|---|---|
| Express + mongoose(몽구스) 연결하기 (0) | 2022.11.14 |
| 외부에서 class로의 접근 (0) | 2022.10.20 |
| Express default setting list (0) | 2022.10.20 |
| Node+Express 서버와 local MongoDB 연동하기 (0) | 2022.10.06 |