Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var submit = document.getElementById('button')
- var form = document.getElementById('form')
- var teste = {teste:'aaaaaa'}
- form.onsubmit = function(e) {
- e.preventDefault();
- const init = {
- method: 'POST',
- body: JSON.stringify(teste),
- headers: {'Content-Type': 'application/json'}
- }
- fetch('http://127.0.0.1:8080/login', init)
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement