2.1.9 • Published 5 years ago
@paychex/adapter-xhr v2.1.9
@paychex/adapter-xhr
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.
Installation
npm install @paychex/adapter-xhrImporting
esm
import { xhr } from '@paychex/adapter-xhr';cjs
const { xhr } = require('@paychex/adapter-xhr');amd
define(['@paychex/adapter-xhr'], function({ xhr }) { ... });require(['@paychex/adapter-xhr'], function({ xhr }) { ... });iife
const { xhr } = window['@paychex/adapter-xhr'];Usage
import { data } from '@paychex/core';
import { xhr } from '@paychex/adapter-xhr';
const proxy = data.createProxy();
const { createRequest, fetch, setAdapter } = data.createDataLayer(proxy, xhr);2.1.9
5 years ago