Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <input id="csrfid" type="hidden" name="_csrf" value="{_csrf}">
- var csrf = document.getElementById('csrfid').value;
- $http({ method: 'POST',
- url: 'http://localhost:8000/myRoute/',
- data: { '_csrf': csrf, 'object': myObject }
- }).success(function(result) {
- //success handler
- }).error(function(result) {
- //error handler
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement