onclick을 하면 fetch로 보낸다.
Client Request-> Server (fetch함수 사용)
Server <-Response Client
fetch("api주소",{
method:"Post",
body: JSON.stringify({
email: this.state.id, ->백엔드에서 원하는 키값으로.
password: this.state.pw,->백엔드에서 원하는 키값으로.
}),
})
.then((response) => response.join
.then((result) => console.log("결과: ", result)
같은 wifi 환경에서만 사용할 수 있다.