fix unsafe methods
This commit is contained in:
parent
23a4ff3af6
commit
6a6153ca48
1 changed files with 1 additions and 1 deletions
|
|
@ -3,7 +3,7 @@
|
|||
(function() {
|
||||
var api = function(method, endpoint, data) {
|
||||
var headers = {'Content-Type': 'application/json'}
|
||||
if (['get', 'post', 'put'].indexOf(method) !== -1)
|
||||
if (['post', 'put', 'delete'].indexOf(method) !== -1)
|
||||
headers['x-requested-by'] = 'yarr'
|
||||
return fetch(endpoint, {
|
||||
method: method,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue