let form = document.getElementById('registrations')
let body = new FormData(form)
let headers = new Headers()
headers.append('X-CSRF_Token', body.get('authenticity_token'))
let action = form.action
fetch(action, {
headers: headers,
method: 'POST',
body: body
})
Created
August 25, 2017 13:25
-
-
Save hovancik/65b844c1cefa9f741b73dc2feeb7606a to your computer and use it in GitHub Desktop.