Skip to content

Instantly share code, notes, and snippets.

@johnpili
Created September 25, 2017 11:25
Show Gist options
  • Save johnpili/5cb7a46194b2df3c12c817b55639edba to your computer and use it in GitHub Desktop.
Save johnpili/5cb7a46194b2df3c12c817b55639edba to your computer and use it in GitHub Desktop.
Vue form submit template with headers
var config = {};
config.headers = {};
config.headers[document.querySelector('meta[name="_csrf_header"]').content] = document.querySelector('meta[name="_csrf"]').content;
this.form.submit("post", "https://url.test.com", config);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment