{"_id":"@agilo/axios-fetch-adapter","_rev":"5-271b9f28fc32b0dcd31b1b204fc426fd","name":"@agilo/axios-fetch-adapter","dist-tags":{"latest":"0.1.0-0","canary":"0.3.0-0"},"versions":{"0.1.0-0":{"name":"@agilo/axios-fetch-adapter","version":"0.1.0-0","author":{"name":"Ante Primorac","email":"ante@agilo.co"},"_id":"@agilo/axios-fetch-adapter@0.1.0-0","maintainers":[{"name":"ilimic","email":"ilimic1@gmail.com"},{"name":"josipmatichr","email":"josip@agilo.co"},{"name":"anteprimorac","email":"anteprimorachr@gmail.com"},{"name":"alenvuletic","email":"alenvuletic@gmail.com"}],"homepage":"https://github.com/agilo/axios-fetch-adapter#readme","bugs":{"url":"https://github.com/agilo/axios-fetch-adapter/issues"},"dist":{"shasum":"66edaafc55889857fc6d88a9c89fa471ebe672ab","tarball":"https://registry.npmjs.org/@agilo/axios-fetch-adapter/-/axios-fetch-adapter-0.1.0-0.tgz","fileCount":17,"integrity":"sha512-ykODiJpdVx5Qm2AO+q0h4v+bGxALu1fCImjmyLgWZ5lzDPzT5p2pKZklqTESvk8IzwoGbGLrpHLgNRjZQVtw0A==","signatures":[{"sig":"MEUCICQLUfjQCRztK1ImuPsMdsU5cShwtrolNtjNj5xVZOZ6AiEAq4dq97tvd3UIkQq5tTbWoQEt93EdPtShSV43kTHhDTo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":25607},"main":"./lib/index.js","types":"./lib/index.d.ts","gitHead":"a0a858f322215fa11cb8ee12612bf3ccfc894b08","private":false,"scripts":{"test":"jest","build":"tsc"},"_npmUser":{"name":"anteprimorac","email":"anteprimorachr@gmail.com"},"repository":{"url":"git+ssh://git@github.com/agilo/axios-fetch-adapter.git","type":"git"},"_npmVersion":"9.7.2","description":"Fetch Adapter for axios","directories":{},"_nodeVersion":"20.3.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"np":"^10.0.2","jest":"^29.7.0","axios":"^1.6.8","ts-jest":"^29.1.2","prettier":"^3.2.5","babel-jest":"^29.7.0","typescript":"^5.4.3","@types/jest":"^29.5.12","@types/node":"^20.11.30","jest-fetch-mock":"^3.0.3","@babel/preset-env":"^7.24.3","jest-environment-jsdom":"^29.7.0"},"peerDependencies":{"axios":"^1.4.0"},"_npmOperationalInternal":{"tmp":"tmp/axios-fetch-adapter_0.1.0-0_1711547965238_0.4752458300896507","host":"s3://npm-registry-packages"}},"0.2.0-0":{"name":"@agilo/axios-fetch-adapter","version":"0.2.0-0","author":{"name":"Ante Primorac","email":"ante@agilo.co"},"_id":"@agilo/axios-fetch-adapter@0.2.0-0","maintainers":[{"name":"ilimic","email":"ilimic1@gmail.com"},{"name":"josipmatichr","email":"josip@agilo.co"},{"name":"anteprimorac","email":"anteprimorachr@gmail.com"},{"name":"alenvuletic","email":"alenvuletic@gmail.com"}],"homepage":"https://github.com/agilo/axios-fetch-adapter#readme","bugs":{"url":"https://github.com/agilo/axios-fetch-adapter/issues"},"dist":{"shasum":"bfc4dd80daf1edd783e8a4dc9f4a04c37ef082b6","tarball":"https://registry.npmjs.org/@agilo/axios-fetch-adapter/-/axios-fetch-adapter-0.2.0-0.tgz","fileCount":19,"integrity":"sha512-ARpRIbiR1G+Wh3QVRDE3cxseizO94higMyd9aZtZPuhWaN2gwaeYICdTAuvMKd9lJmLB3W/PTLtaL8GNorpKnw==","signatures":[{"sig":"MEYCIQDKolhj9CbD3pWsQk7rJEu79nM+ySAKu/rUQakaTxl+gwIhAMDDCTlGPl9oie3HiDND2kwg1v1qlQ12i8q6412AmijL","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":25556},"main":"./lib/index.js","types":"./lib/index.d.ts","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","gitHead":"ca5e81e191085db56398f448ccea09db881d22d7","private":false,"scripts":{"test":"jest","build":"tsc"},"_npmUser":{"name":"anteprimorac","email":"anteprimorachr@gmail.com"},"repository":{"url":"git+ssh://git@github.com/agilo/axios-fetch-adapter.git","type":"git"},"_npmVersion":"9.7.2","description":"Fetch Adapter for axios","directories":{},"_nodeVersion":"20.3.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"np":"^10.0.2","jest":"^29.7.0","axios":"^0.24.0","ts-jest":"^29.1.2","prettier":"^3.2.5","babel-jest":"^29.7.0","typescript":"^5.4.3","@types/jest":"^29.5.12","@types/node":"^20.11.30","jest-fetch-mock":"^3.0.3","@babel/preset-env":"^7.24.3","jest-environment-jsdom":"^29.7.0"},"peerDependencies":{"axios":"^0.24.0"},"_npmOperationalInternal":{"tmp":"tmp/axios-fetch-adapter_0.2.0-0_1711548830232_0.32173650297269507","host":"s3://npm-registry-packages"}},"0.3.0-0":{"name":"@agilo/axios-fetch-adapter","version":"0.3.0-0","author":{"name":"Ante Primorac","email":"ante@agilo.co"},"_id":"@agilo/axios-fetch-adapter@0.3.0-0","maintainers":[{"name":"ilimic","email":"ilimic1@gmail.com"},{"name":"josipmatichr","email":"josip@agilo.co"},{"name":"anteprimorac","email":"anteprimorachr@gmail.com"},{"name":"alenvuletic","email":"alenvuletic@gmail.com"}],"homepage":"https://github.com/agilo/axios-fetch-adapter#readme","bugs":{"url":"https://github.com/agilo/axios-fetch-adapter/issues"},"dist":{"shasum":"719ce2ec240b2ee8b2674edb655b608995e3c0c9","tarball":"https://registry.npmjs.org/@agilo/axios-fetch-adapter/-/axios-fetch-adapter-0.3.0-0.tgz","fileCount":20,"integrity":"sha512-M6dhaEedo0sVKlIob4xjJ3el14/oPUDrnh9mQ3v7gUjj0u7Y5+WtZSDawjY22+nRi5BuR2VLMK+5TejkGAsScg==","signatures":[{"sig":"MEQCIB70M6JxkMMCIRRi0nBF7bbdzZhigvqaqCBME6JDfkQKAiAOh5f7/C3OncxbcXwSelpW95pi6vonWDctX31MBZIQcg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":25811},"main":"./lib/index.js","types":"./lib/index.d.ts","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","gitHead":"e4ebcb7e398f98938e8432c90fd751a799b7c4cf","private":false,"scripts":{"test":"jest","build":"tsc","prepublish":"npm run build"},"_npmUser":{"name":"anteprimorac","email":"anteprimorachr@gmail.com"},"repository":{"url":"git+ssh://git@github.com/agilo/axios-fetch-adapter.git","type":"git"},"_npmVersion":"9.7.2","description":"Fetch Adapter for axios","directories":{},"_nodeVersion":"20.3.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"np":"^10.0.2","jest":"^29.7.0","axios":"^0.24.0","ts-jest":"^29.1.2","prettier":"^3.2.5","babel-jest":"^29.7.0","typescript":"^5.4.3","@types/jest":"^29.5.12","@types/node":"^20.11.30","jest-fetch-mock":"^3.0.3","@babel/preset-env":"^7.24.3","jest-environment-jsdom":"^29.7.0"},"peerDependencies":{"axios":"^0.24.0"},"_npmOperationalInternal":{"tmp":"tmp/axios-fetch-adapter_0.3.0-0_1711573201279_0.6223987463944025","host":"s3://npm-registry-packages"}}},"time":{"created":"2024-03-27T13:59:25.093Z","modified":"2026-05-04T12:25:06.855Z","0.1.0-0":"2024-03-27T13:59:25.408Z","0.2.0-0":"2024-03-27T14:13:50.407Z","0.3.0-0":"2024-03-27T21:00:01.497Z"},"bugs":{"url":"https://github.com/agilo/axios-fetch-adapter/issues"},"author":{"name":"Ante Primorac","email":"ante@agilo.co"},"homepage":"https://github.com/agilo/axios-fetch-adapter#readme","repository":{"url":"git+ssh://git@github.com/agilo/axios-fetch-adapter.git","type":"git"},"description":"Fetch Adapter for axios","maintainers":[{"email":"anteprimorachr@gmail.com","name":"anteprimorac"},{"email":"josip@agilo.co","name":"josipmatichr"}],"readme":"","readmeFilename":""}