카페검색 본문
카페글 본문
-
axios 사용하기 2025.02.25해당카페글 미리보기
성공적인 응답 처리 console.log(response.data); }) .catch(error => { // 오류 처리 console.error('Request failed:', error); }); b. post 방식 const axios = require('axios'); const url = 'https://httpbin.org/post'; const data = { name...
-
라우트 정의 방식과 axios 요청 방식 일치 시키기 2025.06.03해당카페글 미리보기
startIndex: startIndex }) // startIndex가 정의되어 있을 때만 추가 } }); return response; } catch (error) { return error.response.data; } } 서버측 router.delete('/deletePost/:postId/:userId', verifyToken, deletePost); // 게시물 삭제...
-
러시아의 아무 이유없는 공격??.....충분하고 넘치는 이유 잇다.. 2022.03.06해당카페글 미리보기
invasion,” Axios (2/27/22) reported; “Russia’s unprovoked invasion of Ukraine entered its second week Friday,” said CNBC (3/4/22). Vox (3/1/22) wrote of “Putin’s decision to launch an unprovoked and unnecessary war with the second...
-
리액트 개고수님들 제발 도움좀 2022.11.25해당카페글 미리보기
event.preventDefault(); try { const res = await axios.post("/auth/login", { password, username }, { withCredentials...log(res.data.user["username"]); dispatch("LOGIN",res.data?.user); router.push("/") } catch (error: any) { console.log...
-
1112 2022.11.12해당카페글 미리보기
response = await axios.get( 'https://jsonplaceholder.typicode.com/users' ); return response.data; } function Users...useState(null); const [state, refetch] = useAsync(getUsers, [], true); const { loading, data: users, error} = state...