UNPKG

@rails/request.js

Version:

A tiny Fetch API wrapper that allows you to make http requests without need to handle to send the CSRF Token on every request

14 lines (11 loc) 218 B
export class RequestInterceptor { static register (interceptor) { this.interceptor = interceptor } static get () { return this.interceptor } static reset () { this.interceptor = undefined } }