{"_id":"@bjnstnkvc/ajax","_rev":"5-80f1f76b99768fb2b18014f3a8607a87","name":"@bjnstnkvc/ajax","dist-tags":{"latest":"1.0.5"},"versions":{"1.0.0":{"name":"@bjnstnkvc/ajax","version":"1.0.0","description":"JavaScipt AJAX request helper.","main":"./lib/AJAX.js","directories":{"lib":"lib"},"scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/BJNSTNKVC/ajax-request-helper.git"},"keywords":["ajax"],"author":{"name":"Bojan Stankovic"},"license":"MIT","bugs":{"url":"https://github.com/BJNSTNKVC/ajax-request-helper/issues"},"homepage":"https://github.com/BJNSTNKVC/ajax-request-helper#readme","_id":"@bjnstnkvc/ajax@1.0.0","_nodeVersion":"16.13.1","_npmVersion":"8.7.0","dist":{"integrity":"sha512-eAAqF8hO4GEhTAFEhI5b62g5Um2kddl9K79BoRTfCDwH8VyUyzISJHjHFFXex0A058jFzOGQr/sIAWSnwaOYOw==","shasum":"40201d2f73b27552cb7bd740feb4947abeeea06c","tarball":"https://registry.npmjs.org/@bjnstnkvc/ajax/-/ajax-1.0.0.tgz","fileCount":3,"unpackedSize":16249,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCsxM0mfhMsBuu+BGRKnk1i05Xh1vZWXA/CtlKGAdwO9QIhAO+9KQXGIUaqbJYWU42KlwQHhfy4zLfg6z87KOF/KEey"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj+6d+ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrBVQ/6Ay9ZsaMclZYl/XV9qoMGArkATmKHoqA0AlzdszS+Lw4UD7sb\r\ntCsWIz66xyBHbKX75QYCA9g3Tf2JglAsedsFX8jzbqlNhQxVFtChFmtcfTHF\r\nXNWLIDgKPQMq6ofkBxxnRiFkj91HzarACeCdlXC8RGc4Dt3E3ZjD+sf08oJu\r\nMpTEW0CTK/nWZhwRQ+HbBEwYJfjwQVwcwH16zUx6ixx7q4jAPZ83xBKJnq+Y\r\nvDRZmL1AiYh6LtO8Dnln0QoKn/FHXiABjifRkxGOG0Cg/LDk/0+LIkqzAzDB\r\nH8XnNWDi07ebJM+czJzK8St88ae9ObuSwvuL9gW5/rB07EsmR2GtvOMvs9+6\r\nQZWX/YkZXKhWOlDHvSwnS4uQeFgQ0A9+edL3iI1jVO9NfwybX+VuCtIYtus/\r\njZxFEoXWoN7gjyLsZO3weUm0X5iEu2FBE/WZVVGNrY3Ly9DpEpfZRHM7V8+9\r\ndbbEsnQUs+r1YTAGK+iQihodsj9Bhjy7VogkDaIEGFOT2Y+R5h42/wEK+AsD\r\nIDvUnun2gizcSnkwCvdXiaJjHbXjZViCKC4wN4yluPLliCL1NKWE/1jsnvUc\r\nyQF1YIJKLdFgI8eMKKtkHeOCtYIidAop1TmzhgUpo497ZkOYj3hfRh3DvVKI\r\nQ8QEQmcdHekxFQOsoIM4GlNZBXvfhT/jbTA=\r\n=5Jw5\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bjnstnkvc","email":"dev.bojan.stankovic@gmail.com"},"maintainers":[{"name":"bjnstnkvc","email":"dev.bojan.stankovic@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ajax_1.0.0_1677436798634_0.6841885559691108"},"_hasShrinkwrap":false},"1.0.1":{"name":"@bjnstnkvc/ajax","version":"1.0.1","description":"JavaScipt AJAX request helper.","main":"./lib/AJAX.js","directories":{"lib":"lib"},"scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/BJNSTNKVC/ajax-request-helper.git"},"keywords":["ajax"],"author":{"name":"Bojan Stankovic"},"license":"MIT","bugs":{"url":"https://github.com/BJNSTNKVC/ajax-request-helper/issues"},"homepage":"https://github.com/BJNSTNKVC/ajax-request-helper#readme","gitHead":"1923bdc2bfe1200875790053d577e837687f7db5","_id":"@bjnstnkvc/ajax@1.0.1","_nodeVersion":"16.13.1","_npmVersion":"8.7.0","dist":{"integrity":"sha512-ViqiKtyxoBxHQibqaTMM4ZeLnxgN9qT8qemqx6W63zN4EO2Sr+d1iRl9Io3dlpBI80x2oiXKCY+0/whjWBMfAA==","shasum":"d3ac388de853783cf8c81345ee600b8bea4775c7","tarball":"https://registry.npmjs.org/@bjnstnkvc/ajax/-/ajax-1.0.1.tgz","fileCount":2,"unpackedSize":15644,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFnD28Z/9UdxDGxhDyFFH45BJMM8qtDSCCAunKvWtSzmAiEA7LK1dNukJRSCBBE8XFtWEA9WHhtQD8MfdEb20i2XG1Q="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj+7M3ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmo3MBAAo0S136oSCzyz6HKBLM0WYvWV6Eq9cV7LFwsdfBQ1yU/THgG5\r\nu7eCgbyV6Nq/g59rBkTvIUPpfuFY0bUrnxuhHAH5/PUs9edGVI4Z8clotfXP\r\nsEfX0y/FZ4MKgodJLSeCLr9uX29O1NLTOY5n/YRWoz90GaLcshIbneosSkow\r\nDTSzR6qSFUwnVnbaJAl6hj0pJ1M083DdzfadbuN0jpX4Fbr/I+1zbclPYikx\r\nWpJXZzpExcu+XKrhh+tCgYBscdLQSO5IXJP4CqCbLAqCBFp9yeTuyRQ831Oy\r\ni+y1JRtfic2XT5cSvJv94v/dKSlkB/6Do08kGzR3hxlVEc6izVoGwybK+LM8\r\nWKIeWb2ROZgxajBdKZyjS4iPjbaz09cp9BmMJ2C74rLrU9pxfEWubszwIS7f\r\nMooiG6rfkjcDY4pBRQ8oPYFcPK0nuSEu2qmwIi3oHsxI0taKvG5Hlu32cJg7\r\nJkzfyNOBpSdSWEyjIobgh35epcyr8r7KwjsE2jFV2UboAuZkbX+U3f1cKMrR\r\ndBPcoTW+XAmSJ62aGqr4bPkVBn+MOchUPMEn+D7bEOsH9zBvJaXul8kG0CH6\r\n182orrBYtC310s1SUXR/FThGGD4qqBKVtzGdkEk7fw33C1sFobPHKmC8WrPa\r\nu0nAxkQCSFeoG/UuthHdPfVtCGA/0SSYeN4=\r\n=nKWo\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bjnstnkvc","email":"dev.bojan.stankovic@gmail.com"},"maintainers":[{"name":"bjnstnkvc","email":"dev.bojan.stankovic@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ajax_1.0.1_1677439799142_0.34475057036099055"},"_hasShrinkwrap":false},"1.0.2":{"name":"@bjnstnkvc/ajax","version":"1.0.2","description":"JavaScript AJAX request helper.","main":"./lib/AJAX.js","directories":{"lib":"lib"},"scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/BJNSTNKVC/ajax-request-helper.git"},"keywords":["ajax","xhr"],"author":{"name":"Bojan Stankovic"},"license":"MIT","bugs":{"url":"https://github.com/BJNSTNKVC/ajax-request-helper/issues"},"homepage":"https://github.com/BJNSTNKVC/ajax-request-helper#readme","gitHead":"cb177cc79dcf038b7feff1dd8d9f50a1f3ff7e4b","_id":"@bjnstnkvc/ajax@1.0.2","_nodeVersion":"16.13.1","_npmVersion":"9.5.1","dist":{"integrity":"sha512-ahrokHykYk32B0bL/4iCvnrVF7Y3uTcPp4xJKVBgR8U1rZjOvIvDiy4MY8ynVGFsBdn7jbhqPxgM17/41afZmw==","shasum":"36a0f529bacc3027cb27785702b3988a9d41105f","tarball":"https://registry.npmjs.org/@bjnstnkvc/ajax/-/ajax-1.0.2.tgz","fileCount":3,"unpackedSize":17614,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQChOx/3419v7iktwxvAoKddpDB5M3kHWNXIxoSaayaYDwIhALOAqKd3ZjK4GAEX2wi3HmYFusQFMxHdy97jjscneteM"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj++o9ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoiNg//SOC1EcWgzPBD/Ufg9KhURiOGwgg1p+Z2hjPqD7sod2gG+EWj\r\n4C1LyLEm8b78fgPrX7Xy6D4/OdV7j6mFjcmo2i81gxlQJjEJV63b+xHcyFsz\r\nst4HJI4sZvCS0ElTYvmUOKdHifYwl1YTjG9NySTQBOmZ7g6jSoKN6DqcZfGn\r\nSzgH29Sabmm6GiN+983+1uZBhdsUvII1fbLEXHYl7js9+4/X61t0ps7qRXS1\r\n1k2AGbDWiz3bxh25GHRKOCSK2fzMVqvyN7uz/tQ19njMSxgh5UgKHRAA0OJN\r\nz7EEoMOrHSZlauzoykPUBWDIyC66Pqt2vgRuDs4EnXXlvYTfnRKYleflfIl/\r\njVCc/zc517ncVDklWJsh8pnjeOhKd6XFY7rmDg1h2dJeRfl9hDwwLkzpCwIG\r\nZQlJ4PzcfoDqNt7p5x1fp5DRxJWa2L1IgFpkS5bYef6iLGm173fnztV+omG4\r\nALCDy2XY/0zRuCXPR1n0inUpa5W9IRPjhdbzjfh348DEJzVkp5mqCjgUAxdf\r\nrFAgWXgDypPd1+mtCJKoaQNeZAG/cah9WoZK9qUbo4eIeCNoqiSr6uztHenX\r\nU9CJAI2acDH2RHODZOwMkYPsfbkBPF/LtD1oH7pc6UCZCT6U5GT3gGIUMDs5\r\nT2w/fU3ZgYY3/DgGV/MvA4oEXncVevOQ3pA=\r\n=wug0\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bjnstnkvc","email":"dev.bojan.stankovic@gmail.com"},"maintainers":[{"name":"bjnstnkvc","email":"dev.bojan.stankovic@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ajax_1.0.2_1677453884982_0.6337733086277746"},"_hasShrinkwrap":false},"1.0.3":{"name":"@bjnstnkvc/ajax","version":"1.0.3","description":"JavaScript AJAX request helper.","main":"./lib/AJAX.js","type":"module","directories":{"lib":"lib"},"scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/BJNSTNKVC/ajax-request-helper.git"},"keywords":["ajax","xhr"],"author":{"name":"Bojan Stankovic"},"license":"MIT","bugs":{"url":"https://github.com/BJNSTNKVC/ajax-request-helper/issues"},"homepage":"https://github.com/BJNSTNKVC/ajax-request-helper#readme","gitHead":"6e2a9a41cd71f510db92910b5849535e969c4282","_id":"@bjnstnkvc/ajax@1.0.3","_nodeVersion":"16.13.1","_npmVersion":"9.5.1","dist":{"integrity":"sha512-b4GZI/fOpWeU+wfbzoddpLUtl6bsZNV04HI9cINVUz2wGt5vy3GI0zKIugsjjkV6afwbH2cpSJ5Z1fwSZEjLPw==","shasum":"81be34ca14805e33a759e0710c3b8b1b24e93133","tarball":"https://registry.npmjs.org/@bjnstnkvc/ajax/-/ajax-1.0.3.tgz","fileCount":3,"unpackedSize":19738,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCEOHadQpXjsb4hQ1RKWaMaYF5bvm47rv+dzSCjWtaNIwIhAMbob0kSGfvx6PkNmQUm9NzBLTgfQxDFrLAuL4jQWM5h"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkAkapACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq4WA//QnhQN+zBCQi0CZz32mCRmB4SEvL0IPH6UxGq9j9t5TqDEMNI\r\nU5SoOsvbbkI2Du2PScjzfbsDimthrBxLudRmnH5VHrif6IaVneG/7iZdP0zT\r\ncLEsaEZV5ff5j9JlmtVmMqt9J7n5xP0orKKzlxqmhPKy+lQ4d4zNsYvxgFc4\r\nNGoD4mBxMOeS9jXzXv5pVaj3bg0TtrlxDUaq3KxPy/bfAAe+izuCB0Iyekpl\r\n5pKIdESRmSVflj/TGMXnasdyICYCAtzYg8h9ossxt38k40Yy4LD+JIf9WsVf\r\n2etfHtth8YjkcVajif/3MItaYTyFIakAJNj/Q8FmBT87l0Kjnr+72XoM3Qod\r\ne1uHZPmG4W1Lz/tbli7cALuZBxLvxO757n8WYxTf8IAbKZNpNWA/RmfxU3pZ\r\n/OSf49vHjiOHFLLxo2ampvwzYwaOVwgDftSgK9VSwGE/fjAfMqOFWE1xY/xh\r\nofzc1QaJEFrP9IyALZ7vrQgAm4XyBA4K4BPAOMDi9w+8yWp8B+dAFMFfzKcS\r\neAP4nmVpVo33D3rNIyPMAzwOjALIWuZgQYULoSEleliELe7NqjNDubiFSHOn\r\ni/qNf5e9eWSYjAKw4I9WupLDTSCpQ9O94uT0mTfLILf+5dyK/sNK68Mi49DI\r\n8tjMEu5nWGlyQEu507hVNbq6QDsp+VGdrUI=\r\n=TfL6\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bjnstnkvc","email":"dev.bojan.stankovic@gmail.com"},"maintainers":[{"name":"bjnstnkvc","email":"dev.bojan.stankovic@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ajax_1.0.3_1677870761640_0.8545004538629528"},"_hasShrinkwrap":false},"1.0.4":{"name":"@bjnstnkvc/ajax","version":"1.0.4","description":"JavaScript AJAX request helper.","main":"./lib/AJAX.js","type":"module","directories":{"lib":"lib"},"scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/BJNSTNKVC/js-ajax-request-helper.git"},"keywords":["ajax","xhr"],"author":{"name":"Bojan Stankovic"},"license":"MIT","bugs":{"url":"https://github.com/BJNSTNKVC/js-ajax-request-helper/issues"},"homepage":"https://github.com/BJNSTNKVC/js-ajax-request-helper#readme","gitHead":"60996cb23452cc10abeb97f7319cb4590d959d40","_id":"@bjnstnkvc/ajax@1.0.4","_nodeVersion":"16.13.1","_npmVersion":"9.5.1","dist":{"integrity":"sha512-Q/oDZ8ADU8bACnXL4lMi5g+Smgb+sbre4srjvL/7s1YPhIMPvKmtGy64SVQx+TaWBkD/59yE8NOJUUiTOPUWaQ==","shasum":"88af48627b50da4ddf7d2cafc99fe876615b569b","tarball":"https://registry.npmjs.org/@bjnstnkvc/ajax/-/ajax-1.0.4.tgz","fileCount":4,"unpackedSize":21056,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDjHr1OYbiACCYdtP8isLCVDMcg/jI1ja5/5+lwT2xX3AIgWgFN+7sbOSnCaqXkcdLBSCgfPRJPCGt/KVVGee4eRyo="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkC8RNACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmo8tw//YNuBGSpV6zc9zGnfKSSgKDfmGsxVRkhduZtb2NCzZYt8Zz+7\r\n+gcOFoJsNg3ZQqi9/eeAXxbjgGXUNogqrZ/fC7Po5ZtCTZNY5mrAO9UWuPD8\r\nDVsfo3+ShwaySgOa5H7CTkYInhEpmxYhEdGxjigHStCsR81wXvDPCaIKS5O/\r\nsVNpJFBeT80AXxI6elfUMQj/SPCFc9AYlutR9nkgoF31Z2reyBU4Ha493GI9\r\nkF+pb/pOrEFGJ3JFLL5mG8C7LLeoIogrV2sn7YwfF1tiTQmXxZb1AB0zkt+v\r\n0JzBkiOinVdCr4sLGT26z0b42CVg8v4uBSTVTK0LW7qQOH8AqGkCXhXwt2al\r\nUPtWcRM0yvSSjxqILMY7rWQqZHruJDvRX/3ykjn6xFeO0FZsI47DgqDo66sw\r\ncVhSQe9D9OyrxBHsFZNQsv78AqyVKnCHhLbDsJXwrn6Ml9ryoDpizgIkz076\r\nQzAbWe2O65VZUNiCPeAQIOr1bMXnNCExosxuCnPXWa9uH0u/bqwmKuvAlURK\r\nYdOPS8OC0EZpn11UsIrH0zl82NwKHi8JRLqsGQwcI3+h1XEp08/I7oAwZiUU\r\nb4InueABHtPNWO3etVmxg4JEsSb5YKUQBKzHoh+GtdlY9QUQZwPkhZvmHD2q\r\nF1ZtGvaZca/jkX6bpS6ftMdyvrYH2r/NJ3M=\r\n=tL51\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bjnstnkvc","email":"dev.bojan.stankovic@gmail.com"},"maintainers":[{"name":"bjnstnkvc","email":"dev.bojan.stankovic@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ajax_1.0.4_1678492749691_0.2984605262167108"},"_hasShrinkwrap":false},"1.0.5":{"name":"@bjnstnkvc/ajax","version":"1.0.5","description":"JavaScript AJAX request helper.","main":"./lib/AJAX.js","type":"module","directories":{"lib":"lib"},"scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/BJNSTNKVC/js-ajax-request-helper.git"},"keywords":["ajax","xhr"],"author":{"name":"Bojan Stankovic"},"license":"MIT","bugs":{"url":"https://github.com/BJNSTNKVC/js-ajax-request-helper/issues"},"homepage":"https://github.com/BJNSTNKVC/js-ajax-request-helper#readme","gitHead":"88ce6818aabbe6890dece83901739ea6d9a2d335","_id":"@bjnstnkvc/ajax@1.0.5","_nodeVersion":"16.13.1","_npmVersion":"9.6.6","dist":{"integrity":"sha512-09n6EzAQpagkVwivfhjOp4pP0LOA2U/VFC+flR1enrjIWeG05tgC17EoS0/xvkprkpKW3tiqzBlDrg8DtYHlPw==","shasum":"0444095cf87d6701e09f0e77f35813f482c3eb01","tarball":"https://registry.npmjs.org/@bjnstnkvc/ajax/-/ajax-1.0.5.tgz","fileCount":4,"unpackedSize":22240,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDVKfWKWCol8JQI9F2kzFC7kC4qVy2zq47a1KWTQwOLXQIhAN+uBBsYRApwkjam5LyamZROtaHiQqHyVSFXNbbtyLuE"}]},"_npmUser":{"name":"bjnstnkvc","email":"dev.bojan.stankovic@gmail.com"},"maintainers":[{"name":"bjnstnkvc","email":"dev.bojan.stankovic@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ajax_1.0.5_1685404574573_0.7387473318237443"},"_hasShrinkwrap":false}},"time":{"created":"2023-02-26T18:39:58.574Z","1.0.0":"2023-02-26T18:39:58.776Z","modified":"2023-05-29T23:56:14.842Z","1.0.1":"2023-02-26T19:29:59.307Z","1.0.2":"2023-02-26T23:24:45.127Z","1.0.3":"2023-03-03T19:12:41.790Z","1.0.4":"2023-03-10T23:59:09.844Z","1.0.5":"2023-05-29T23:56:14.732Z"},"maintainers":[{"name":"bjnstnkvc","email":"dev.bojan.stankovic@gmail.com"}],"description":"JavaScript AJAX request helper.","homepage":"https://github.com/BJNSTNKVC/js-ajax-request-helper#readme","keywords":["ajax","xhr"],"repository":{"type":"git","url":"git+https://github.com/BJNSTNKVC/js-ajax-request-helper.git"},"author":{"name":"Bojan Stankovic"},"bugs":{"url":"https://github.com/BJNSTNKVC/js-ajax-request-helper/issues"},"license":"MIT","readme":"# AJAX\r\n\r\nJavaScript AJAX request helper.\r\n\r\n## Installation & setup\r\n\r\n### NPM\r\n\r\nYou can install the package via npm:\r\n\r\n    npm install @bjnstnkvc/ajax\r\n\r\n### CDN\r\n\r\nYou can install the package via jsDelivr CDN:\r\n\r\n```html\r\n<script src=\"https://cdn.jsdelivr.net/npm/@bjnstnkvc/ajax/lib/AJAX.min.js\"></script>\r\n```\r\n\r\n## Usage\r\n\r\nOnce imported, you can make an AJAX request using the following methods:\r\n\r\n#### Get\r\n\r\nLoad data from the server using an HTTP GET request:\r\n\r\n```js\r\nAJAX.get({ config })\r\n```\r\n\r\n#### Post\r\n\r\nSend data to the server using an HTTP POST request:\r\n\r\n```js\r\nAJAX.post({ config })\r\n```\r\n\r\n#### Patch\r\n\r\nSend data to the server using an HTTP PATCH request:\r\n\r\n```js\r\nAJAX.patch({ config })\r\n```\r\n\r\n#### Put\r\n\r\nSend data to the server using an HTTP PUT request:\r\n\r\n```js\r\nAJAX.put({ config })\r\n```\r\n\r\n#### Delete\r\n\r\nDelete a resource from the server using an HTTP DELETE request:\r\n\r\n```js\r\nAJAX.delete({ config })\r\n```\r\n\r\n## Config\r\n\r\nIn order to send an AJAX request using the methods listed above, you need to pass `config` object. The Config object consists of the following properties:\r\n\r\n#### url\r\nA string representing the URL to send the request to:\r\n\r\n```js\r\nAJAX.get({\r\n    url: 'posts',\r\n})\r\n````\r\n\r\n#### params\r\nAn object used to parse and stringify URL parameters:\r\n\r\n```js\r\nAJAX.get({\r\n    url: 'https://www.example.com/authors/{author}/posts/{post}',\r\n    params: {\r\n        author: 'bjnstnkvc',\r\n        post: 2\r\n    }\r\n})\r\n````\r\n\r\nExample above would generate the following URL:\r\n\r\n```\r\nhttps://www.example.com/authors/bjnstnkvc/posts/2\r\n```\r\n\r\n#### query\r\nAn object used to parse and stringify URL query strings:\r\n\r\n```js\r\nAJAX.get({\r\n    url: 'https://www.example.com/posts',\r\n    query: {\r\n        page: 2\r\n    }\r\n})\r\n````\r\n\r\nExample above would generate the following URL:\r\n\r\n```\r\nhttps://www.example.com/posts?page=2\r\n```\r\n\r\nSometimes you need to pass a query string as an array, in order to do so, use the following syntax:\r\n\r\n```js\r\nAJAX.get({\r\n    url: 'https://www.example.com/posts',\r\n    query: {\r\n        tag: ['html', 'css'],\r\n        page: 2,\r\n    },\r\n})\r\n````\r\n\r\nExample above would generate the following URL:\r\n\r\n```\r\nhttps://www.example.com/posts?tag[]=html&tag[]=css&page=2\r\n```\r\n\r\n#### withCredentials\r\n\r\nA boolean value that indicates whether cross-site Access-Control requests should be made using credentials.\r\n\r\n```js\r\nAJAX.get({\r\n    url: 'https://www.example.com/posts',\r\n    withCredentials: true,\r\n})\r\n````\r\n#### headers\r\n\r\nIn case you would like to add headers to AJAX request, you can pass them via `headers` property: \r\n\r\n```js\r\nAJAX.get({\r\n    url: 'https://www.example.com/posts',\r\n    headers: {\r\n        'Accept': 'application/json',\r\n    }\r\n})\r\n````\r\n\r\n#### data\r\n\r\nAn object containing body of data to be sent in the XHR request.\r\n\r\n```js\r\nAJAX.post({\r\n    url: 'https://www.example.com/posts',\r\n    data: {\r\n        title: 'A Post title',\r\n        description: 'A Post description',\r\n    }\r\n})\r\n````\r\n\r\n#### States\r\n\r\nEach AJAX request goes through 5 different [states](https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/readyState):\r\n\r\n| Value | State            | Description                                                   |\r\n|-------|------------------|---------------------------------------------------------------|\r\n| 0     | UNSENT           | Client has been created. open() not called yet.               |\r\n| 1     | OPENED           | open() has been called.                                       |\r\n| 2     | HEADERS_RECEIVED | send() has been called, and headers and status are available. |\r\n| 3     | LOADING          | Downloading; responseText holds partial data.                 |\r\n| 4     | DONE             | The operation is complete.                                    |\r\n\r\nAdditionally, 3 custom states have been added for more convenience when making AJAX requests:\r\n\r\n| State  | Description                                               |\r\n|--------|-----------------------------------------------------------|\r\n| BEFORE | A state prior to request being sent.                      |\r\n| AFTER  | A state after the response has been sent from the server. |\r\n| ERROR  | A state when the request fails.                           |\r\n\r\nIn order to access each state, you can add `states` property to AJAX config via following syntax:\r\n\r\n```js\r\nAJAX.get({\r\n    url   : 'https://www.example.com/posts',\r\n    states: {\r\n        before() {\r\n            // \r\n        },\r\n        unsent(xhr) {\r\n            // \r\n        },\r\n        opened(xhr) {\r\n            // \r\n        },\r\n        received(xhr) {\r\n            // \r\n        },\r\n        loading(xhr, response) {\r\n            // \r\n        },\r\n        done(xhr, response) {\r\n            // \r\n        },\r\n        error(xhr, response) {\r\n            // \r\n        },\r\n        after() {\r\n            //\r\n        }\r\n    }\r\n})\r\n```\r\n\r\n> **Note:** `loading`, `done` and `error` states return [xhr object](https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest) as well as already parsed [xhr response](https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/response) to JSON.  \r\n\r\n## Defaults\r\n\r\nAJAX helper gives you an option to set [config](#config) defaults using the following syntax:\r\n\r\n```js\r\nAJAX.defaults({\r\n    url: 'https://www.example.com/posts',\r\n    withCredentials: true,\r\n    headers: {\r\n        'X-Requested-With': 'XMLHttpRequest',\r\n        'Accept'          : 'application/json',\r\n    }\r\n});\r\n\r\nAJAX.post({\r\n    ...\r\n})\r\n```\r\n\r\nBy doing so, every subsequent AJAX instance would use the config set above.\r\n\r\nIn case you need to overwrite previously set default config value, you simply need to set them :\r\n\r\n```js\r\nAJAX.patch({\r\n    url: 'https://www.example.com/posts/2',\r\n    withCredentials: false,\r\n    ...\r\n});\r\n```\r\n","readmeFilename":"README.md"}