{"_id":"@taquito/axios-fetch-adapter","_rev":"1052303","name":"@taquito/axios-fetch-adapter","description":"Fetch adapter for axios","dist-tags":{"latest":"0.3.1"},"maintainers":[{"name":"danielelisi","email":"danielelisi978@gmail.com"},{"name":"dsawali","email":"davis.sawali@ecadlabs.com"},{"name":"jevonearth","email":"jev@ecadlabs.com"},{"name":"roxaneletourneau","email":"roxane@ecadlabs.com"}],"time":{"modified":"2024-09-20T13:40:45.000Z","created":"2023-04-10T17:03:04.290Z","0.3.1":"2023-04-10T17:03:04.290Z"},"users":{},"author":{"name":"nta.toan@gmail.com"},"repository":{"type":"git","url":"git+https://github.com/ecadlabs/axios-fetch-adapter.git"},"versions":{"0.3.1":{"name":"@taquito/axios-fetch-adapter","version":"0.3.1","description":"Fetch adapter for axios","main":"index.js","module":"index.js","types":"index.d.ts","scripts":{"release":"np","test":"echo done","dev":"vite"},"repository":{"type":"git","url":"git+https://github.com/ecadlabs/axios-fetch-adapter.git"},"keywords":["axios","adapter","fetch"],"author":{"name":"nta.toan@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/ecadlabs/axios-fetch-adapter/issues"},"homepage":"https://github.com/ecadlabs/axios-fetch-adapter#readme","devDependencies":{"axios":"^0.27.2","np":"^7.6.1","vite":"^2.8.0"},"peerDependencies":{"axios":">=0.26.0"},"gitHead":"673cd401e8c5b7d1d9ba689b0cc06f8c05d29044","_id":"@taquito/axios-fetch-adapter@0.3.1","_nodeVersion":"16.19.0","_npmVersion":"8.19.3","dist":{"integrity":"sha512-emPSsrYQumiUcZsDcTAP68gLJpKoJmbzwyy2D2h2/Zm3Q1TbAJJS1kbnwvQZfq0FjYyYCWYSITtAS3w0EUAG4g==","shasum":"08c4af44a26e5a18475ee15d8d46b1576f5992cd","tarball":"http://registry-npm.ywwl.com/@taquito/axios-fetch-adapter/download/@taquito/axios-fetch-adapter-0.3.1.tgz","fileCount":7,"unpackedSize":11355,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDHyFSH3NlC8fe56NbVWK5FxD+n+7LZe36jM5tzpvFEpwIhANdBm2ylsnqUIPChFjK6O++MJVpu+ef8nrQwRJlSmtYy"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkNEFIACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrL8A//Qp4GqMrB68r03F232RGW5RCl9QlH11IblYNz1S8/W/YPHws7\r\novEUMPdTQt98I0HLDZ+ocSp2pLC9AJrFo4j/s8lZNisCjT9CMJW2K9MuigqK\r\nHzQ/0xADDphXJ70Tw9ipWMH3KtIDMrf/nC2XFtQEF9SaXRmDaakd5IGYR2CA\r\n4rH7xeFha/7R2/Cx3r4g2rFn/UrPiSNQCIs14mKHv7biOOj+xHjdByRbjwd6\r\nMoAO8UTVM51MbLqnjoufPDuHXCT09EEgammCSN6UMRpcwb3TF35CqN9TNm5H\r\nTWtukeEl77PhFNLCi4EJ6j/RkSoPeOZur0RpV8iphuZzskvj881QIBmug15/\r\n56ZRA+qbW/9Jp86+t2UJw/I2tdcjzlmh5zPYk0kGmEzxXVDIAUiOFCS97w+c\r\nxFPHpZ8WUTEpVs+IE6uMfB25lp+R9qKkNor7graKCyLUVBA4zmmn/FSs4bJk\r\nqKY/mUdYAkpBDotJHTdW2LvPzXLGqMTnXMKAodIBdCe0VA/U9vno8iEL/1Av\r\nV19/Ys1XkWnxz0+yYvq+navIlfafzS27hY+S3LkxAqJt+FEraEeMKieFLsmn\r\nKQ5mAENRuvh26LzfEZAo6badBoV666CsE8BDYSgTaB8C+gWjrBjGsTj2Ic6k\r\nT5316mVG10DzDnmO1ViX+mAVfmpb6K5l5vY=\r\n=/dCf\r\n-----END PGP SIGNATURE-----\r\n","size":4336,"noattachment":false,"key":"/@taquito/axios-fetch-adapter/-/@taquito/axios-fetch-adapter-0.3.1.tgz"},"_npmUser":{"name":"danielelisi","email":"danielelisi978@gmail.com"},"directories":{},"maintainers":[{"name":"danielelisi","email":"danielelisi978@gmail.com"},{"name":"dsawali","email":"davis.sawali@ecadlabs.com"},{"name":"jevonearth","email":"jev@ecadlabs.com"},{"name":"roxaneletourneau","email":"roxane@ecadlabs.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/axios-fetch-adapter_0.3.1_1681146184073_0.6240083397540841"},"_hasShrinkwrap":false,"publish_time":1681146184290,"_cnpm_publish_time":1681146184290}},"readme":"# Why\n\nI'm going to adopt PWA to my web applications and those web apps are heavily using Axios with the default XMLHTTPRequest adapter. Hence, I have to switch to Fetch adapter; However, Axios doesn't have an adapter for fetch API for now. So I write one to use while waiting for an offical one from Axios.\n\n# Installation and Usage\n\nYou can install the adapter directly from this repository URL or feel free to copy its source code to your project.\n\n``` sh\nnpm install axios\nnpm install @vespaiach/axios-fetch-adapter\n```\n\nThere are two ways to use it:\n\n1.  Create a new instance of Axios and pass this adapter in configuration\n\n``` js\nconst instance = axios.create({\n  baseURL: 'https://some-domain.com/api/',\n  timeout: 1000,\n  adapter: fetchAdapter\n  ....\n});\n```\n\n2.  Pass this adapter in each of request\n\n``` js\naxios.request({\n  url: '/user',\n  method: 'get',\n  adapter: fetchAdapter\n  ...\n})\n```\n\n3.  Use with FormData \n\n``` js\naxios.request({\n  url: '/user',\n  method: 'post',\n  adapter: fetchAdapter\n  data: new FormData(formId)\n  ...\n})\n```\n\n# Note\n\n- Since, this adapter relies on fetch API so it won't work in Node environment\n","_attachments":{},"homepage":"https://github.com/ecadlabs/axios-fetch-adapter#readme","bugs":{"url":"https://github.com/ecadlabs/axios-fetch-adapter/issues"},"license":"MIT"}