-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This reverts commit ca0da1d.
- Loading branch information
Showing
10 changed files
with
130 additions
and
235 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
import axios from 'axios' | ||
|
||
export default function Login1() { | ||
const Login1 = async () => { | ||
try { | ||
const response = await axios.post('http://localhost:8000/api/v1/calendar/token/', {'bla':'bla'}, { | ||
headers: { | ||
'Content-Type': 'application/json' | ||
} | ||
}); | ||
console.log('response-data: ', response.data); | ||
} catch (error) { | ||
console.error('error: ', error); | ||
} | ||
} | ||
|
||
return (<button onClick={Login1}> Fazer login</button>) | ||
} | ||
|
||
|
||
|
||
|
||
|
||
// import {} from 'react-router-dom' | ||
// import axios from 'axios' | ||
|
||
|
||
// export default function Login1() { | ||
// const Login1 = async () => { | ||
|
||
|
||
|
||
|
||
// var options = { | ||
// method: 'POST', | ||
// url: 'http://localhost:8000/api/v1/calendar/token/', | ||
// headers: { | ||
// 'Content-Type': 'application/json', | ||
// 'Allow-Control-Allow-Origin': '*' | ||
// }, | ||
// body: {'bla':'bla'} | ||
|
||
// }; | ||
|
||
|
||
// axios.request(options).then(function (response) { | ||
// console.log(response.data); | ||
// }).catch(function (error) { | ||
// console.error(error); | ||
// }); | ||
|
||
|
||
// } | ||
// return (<button onClick={() => Login1()}> Fazer login</button>) | ||
// } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.