houdini/client/js/common/request.js

11 lines
253 B
JavaScript
Raw Normal View History

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)
}