You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
552 B
23 lines
552 B
import axios from 'axios';
|
|
|
|
const App = () => {
|
|
const createSession = (event)=>{
|
|
event.preventDefault();
|
|
axios.post('http://localhost:3000', {}, {withCredentials:true}).then((response)=>{
|
|
console.log(response);
|
|
})
|
|
}
|
|
const getSession = (event)=>{
|
|
event.preventDefault();
|
|
axios.get('http://localhost:3000', {withCredentials:true}).then((response)=>{
|
|
console.log(response);
|
|
})
|
|
}
|
|
return <>
|
|
<button onClick={createSession}>Create Session</button>
|
|
<button onClick={getSession}>Get Session Info</button>
|
|
</>
|
|
}
|
|
|
|
export default App;
|