A data adapter that uses the XMLHttpRequest object to convert a Request into a Response. Can be passed to the @paychex/core createDataLayer factory method to enable data operations on NodeJS.
npm install @paychex/adapter-xhr
import { xhr } from '@paychex/adapter-xhr';
const { xhr } = require('@paychex/adapter-xhr');
define(['@paychex/adapter-xhr'], function({ xhr }) { ... });
require(['@paychex/adapter-xhr'], function({ xhr }) { ... });
const { xhr } = window['@paychex/adapter-xhr'];
import { data } from '@paychex/core';
import { xhr } from '@paychex/adapter-xhr';
const proxy = data.createProxy();
const { createRequest, fetch, setAdapter } = data.createDataLayer(proxy, xhr);