Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- fetch('http://127.0.0.1:8000/user/obtain_token/', {
- method: 'post',
- headers: {
- 'Accept': 'application/json',
- 'Content-Type': 'application/json',
- },
- body: JSON.stringify({"email": "2@ukr.net", "password": "123456aA"})
- }).then(res=>res.json())
- .then(res => localStorage.setItem('Auth', JSON.stringify(res)))
- console.log(localStorage.getItem('Auth'))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement