houdini/app/javascript/legacy/common/request.js

12 lines
283 B
JavaScript
Raw Normal View History

2019-11-06 20:36:28 +00:00
// License: LGPL-3.0-or-later
const R = require('ramda')
const request = require('flyd-ajax')
module.exports = options => {
options.headers = R.merge({
'Content-Type': 'application/json'
, 'X-CSRF-Token': window._csrf
}, options.headers || {})
return request(options)
}