Open nukosuke opened 7 years ago
import 'isomorphic-fetch'; import ReactOnRails from 'react-on-rails'; fetch(API_URL, { method: method, headers: ReactOnRails.authenticityHeaders({ 'Accept': 'application/json', 'Content-Type': 'application/json', }), body: JSON.stringify(...), credentials: 'same-origin', });