{"_id":"@aofl/api-request","_rev":"154-0a88efbad2710623e65e3ab2ddd4eda3","name":"@aofl/api-request","dist-tags":{"next":"2.0.0-alpha.17","next-alpha":"3.0.0-alpha.12","beta":"3.5.0-beta.22","alpha":"4.0.0-alpha.45","latest":"3.14.1"},"versions":{"1.0.0-beta.1":{"name":"@aofl/api-request","version":"1.0.0-beta.1","author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"ISC","_id":"@aofl/api-request@1.0.0-beta.1","maintainers":[{"name":"ariankhosravi","email":"arian@arin.io"},{"name":"bill.salak","email":"bill.salak@aofl.com"},{"name":"sergolius","email":"sergolius@gmail.com"}],"dist":{"shasum":"a5cdd3e0c77796a0c69be7593ea97d9e9b0bde84","tarball":"https://registry.npmjs.org/@aofl/api-request/-/api-request-1.0.0-beta.1.tgz","fileCount":5,"integrity":"sha512-WiRjnvhcUZ45gtNZc9vByIcPsRCCn/hx3UIbBlgP0GmW2m8j1tScAh1gGQAgl4ZA66lkP+kbuCdVbXlQsmT9Eg==","signatures":[{"sig":"MEUCICYA3bKayFTyCCFt6+HnqQvBIw6qaW+gwBMVMlq8QBS1AiEA/1DTLNg3gRkzPO/ZMuTmUj56Fn3c/3CACY0S/KdV5VQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":4028},"main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git@gitlab.aofl.com:CoreJS/aofl-os.git","type":"git"},"_npmVersion":"5.5.1","description":"","directories":{},"_nodeVersion":"8.9.0","dependencies":{"@aofl/cache-manager":"^1.0.0-beta.1"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/api-request_1.0.0-beta.1_1518739766016_0.6131583043443884","host":"s3://npm-registry-packages"}},"1.0.0-beta.2":{"name":"@aofl/api-request","version":"1.0.0-beta.2","author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"ISC","_id":"@aofl/api-request@1.0.0-beta.2","maintainers":[{"name":"ariankhosravi","email":"arian@arin.io"},{"name":"bill.salak","email":"bill.salak@aofl.com"},{"name":"sergolius","email":"sergolius@gmail.com"}],"dist":{"shasum":"10e63e1581eb86220c6eacea0d3be8b0bd23827d","tarball":"https://registry.npmjs.org/@aofl/api-request/-/api-request-1.0.0-beta.2.tgz","fileCount":5,"integrity":"sha512-niaFwQwakj0Mp5CNRRT5alPpRPr47bnq5kqHwKT4kT0s9602jMDVhlabZKyRHoJHGoNEsnu38XSAodMd45UkTg==","signatures":[{"sig":"MEYCIQDH9+AZHPjzT606DlhRcMgGyBnALw55Mp91JViKlCSu4gIhAMMQWrYTdXQpqF3xIoyym+IV6aj8VeyIigKf5bNpIomz","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":4072},"main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git@gitlab.aofl.com:CoreJS/aofl-os.git","type":"git"},"_npmVersion":"5.5.1","description":"","directories":{},"_nodeVersion":"8.9.0","dependencies":{"@aofl/cache-manager":"^1.0.0-beta.3"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/api-request_1.0.0-beta.2_1520644545902_0.3711951764617596","host":"s3://npm-registry-packages"}},"1.0.0-beta.3":{"name":"@aofl/api-request","version":"1.0.0-beta.3","author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"ISC","_id":"@aofl/api-request@1.0.0-beta.3","maintainers":[{"name":"ariankhosravi","email":"arian@arin.io"},{"name":"bill.salak","email":"bill.salak@aofl.com"},{"name":"sergolius","email":"sergolius@gmail.com"}],"dist":{"shasum":"165a263209ff3536721a4ea70258d0cd22ab51a5","tarball":"https://registry.npmjs.org/@aofl/api-request/-/api-request-1.0.0-beta.3.tgz","fileCount":5,"integrity":"sha512-z5e3S+1U4DRgXYLOUFUzeINMtDF5x2WjXxLG7WziARDJ5BuRJb8Fh2GFhlbm+0Wh+LTxYy4K1apYCxe1o2P5LQ==","signatures":[{"sig":"MEUCIHhsXsEi5CZj8uMDA55Wb3i/ChssGm9Q5VpJun1jmSnkAiEAskaxmmTALTs0+qqMLFYRri/NRGVPRPn4agSMXNbXchY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":4072},"main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git@gitlab.aofl.com:CoreJS/aofl-os.git","type":"git"},"_npmVersion":"5.7.1","description":"","directories":{},"_nodeVersion":"8.9.0","dependencies":{"@aofl/cache-manager":"^1.0.0-beta.4"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/api-request_1.0.0-beta.3_1521405552408_0.22078290737256467","host":"s3://npm-registry-packages"}},"1.0.0-beta.4":{"name":"@aofl/api-request","version":"1.0.0-beta.4","author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"ISC","_id":"@aofl/api-request@1.0.0-beta.4","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"},{"name":"bill.salak","email":"bill.salak@aofl.com"}],"dist":{"shasum":"b0960721c262e1ba39e923e324b8662721272522","tarball":"https://registry.npmjs.org/@aofl/api-request/-/api-request-1.0.0-beta.4.tgz","fileCount":5,"integrity":"sha512-Zy84yco7KmhmPCYJ3yttI24iR3y5QK8JxpxN+kY9PQ3x98R2WXabraFC2433+S77Nk2OlEVx9O3VLDve0Mi8Tw==","signatures":[{"sig":"MEYCIQCIfzgLnbGxavvk1YY0V/UbuC4g2uh3rIp2AwAiyQM6dQIhAIZi3cajvrthV8GeouNS7a5h+ucPQHeAdUfBSdj69b8t","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":4072},"main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git@gitlab.aofl.com:CoreJS/aofl-os.git","type":"git"},"_npmVersion":"5.8.0","description":"","directories":{},"_nodeVersion":"8.9.0","dependencies":{"@aofl/cache-manager":"^1.0.0-beta.7"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/api-request_1.0.0-beta.4_1523057686805_0.0746549358226909","host":"s3://npm-registry-packages"}},"1.0.0-beta.5":{"name":"@aofl/api-request","version":"1.0.0-beta.5","author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"ISC","_id":"@aofl/api-request@1.0.0-beta.5","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"},{"name":"bill.salak","email":"bill.salak@aofl.com"}],"dist":{"shasum":"a1b8ea7e675f98ce707be4aec979a685fce8b1f9","tarball":"https://registry.npmjs.org/@aofl/api-request/-/api-request-1.0.0-beta.5.tgz","fileCount":5,"integrity":"sha512-blftmHCCog6PqUFHk39GIbaQtX1rjPres7KSShnNC0Goz+oLZfg2Is3mSwSj4Oh2KTm/rOuK7LeNu9wuCEC6Qw==","signatures":[{"sig":"MEUCIDU65QW7g05S2DytOztD1c9QHISxAkWAAMcOfYkMmetLAiEA78hMfgJ+0TO1Dkwu3JrKvDqL7OrrAFP6mPYbcK2qfes=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":4072,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJa4nkuCRA9TVsSAnZWagAAXUAQAIOKO7RwMn8nENes3Ro2\nEpWy0aKQN1VjBBhtKqmRm8uG90zNCRnPsZi3rOWlskTIJlK+15hZEI1j+4tK\nfLy1qx1cD5aqrYyfxhjOo+UYYp4e9mpzCECGOsBqHLNAe0LxbNhCXkdEE+Ex\n6TYlIrNIB1unwzWQobtRTx0SmAZlJKHZ6Qhg8A+Db9lzjJmMNUTf32wp4Wio\nII8XSY58OSExJkUs4a8Sr7Rlw2BwqMqR3nqG00hJw5akv7qL7JDno5LfggUl\n8ioNYw6xOhbZqantBSgBa3vj61UZ9J31vcdbdKt65jjLSWQq7U4BHG0RtacW\nwh/wip/YOcdBtojHUHZjNLoEVDe79ujoZPRIv1njfuN0F1FhTNbxGCxYkZuu\n4JuapwINqZlOlTXs76aFld0Hq9KoeAnj2f0Q32fUEFSQ8fGkrRn+J6ptJa/7\n/Uxx1nIAmCjPiiA9FUs2a38JcoWsqJVU3MutpBwtmKsH3Nrl6s84NlccjJDo\nri9XjkT6iz52naifgMK7t4V0g06m4Fxwv8d0Ozkvo7YpI64jhijXYTT3nrQd\nB2czTQZHbHPPw1tYP9CNwe+XCWxX+6HxcqNUsO9x/HtWzzNzey0BmjACNVHw\nWYtDlTpAG1xWPKhOdMUHdxsGYIZ14k/mzVBcpPez363r/SXj7WflW3EGxYR8\nEMqG\r\n=2qlU\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git@gitlab.aofl.com:CoreJS/aofl-os.git","type":"git"},"_npmVersion":"5.8.0","description":"","directories":{},"_nodeVersion":"8.9.0","dependencies":{"@aofl/cache-manager":"^1.0.0-beta.8"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/api-request_1.0.0-beta.5_1524791598217_0.8884444720613387","host":"s3://npm-registry-packages"}},"1.0.0-beta.20":{"name":"@aofl/api-request","version":"1.0.0-beta.20","author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"ISC","_id":"@aofl/api-request@1.0.0-beta.20","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"},{"name":"bill.salak","email":"bill.salak@aofl.com"}],"dist":{"shasum":"6544940f7738a07aea0f77e85ed6bf0b69be9bf5","tarball":"https://registry.npmjs.org/@aofl/api-request/-/api-request-1.0.0-beta.20.tgz","fileCount":5,"integrity":"sha512-6ESNOMwx3/Hc5oV1xZn6O8Yar3HmmpdXPLtAQ8oob4ybE5pzwK8M7TEbO2SW5AeRzvp0NVCXrMdtcWAC4x8gXg==","signatures":[{"sig":"MEYCIQDO47jL/59iPZm6b+e7MhBjnG60JPVcZYP64UvNOXkq6gIhAOlaT5VImUMJ1eEnp+yaa5h3CoiPYDw7wkr+LMB/UMIq","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":4074,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbV7l+CRA9TVsSAnZWagAArCkQAJeasg+LG+uoPyY6s1vS\nwKa+Gv9pnBFHZNtBBdcIhrMqF6CacNQbtDog2k5LH7olLTp2RC5Iyp/uC2ta\nE25S/gTqPI9TjK5oiReMNXkhtcNoSKbScsXYY0QtbpQzlHxEmAkK4EriJSnN\nijsgRBnZPRECjRfu73H37g+PwGbTfi/UfN5+88cV62DNa2sH24nTdm0HoAc1\n4r1S6kOJL7UD0pFCVAevp/bLWAG1fjGtxXr8Igzyd3iRu2uEX6mB6ADvBjG4\nFvvuf8etneSik4qFMjOfOpiMde+gUmghetFOTomTY/URUFUw+JXbzM+DBHKS\nw7IAXxDs8K7SccnPC7Hhn0TuU8tsmh0McJgxrKomZnhrmnXd+rvqEUPoFWh6\nVauGsiAl8AH6dBs+Ts+Vf4qOYdLFKq2kZwSXBP7R6/8EtlmGToY8ObGAIfws\nNKV+/EEe3tfDoSWFYbZMEUKK92Xs59EtrXPyLUhgGsRERCXDXEkjMzUUV0UM\nnW7rhChsl3h4yCGrol5H+FJTtvSp2o2jExyE165NpDG4H7TVRtL3w/9f/gX7\n582+LF8jYirH0SsGExUQAy4uvM4SQXUsdJL71beMJW6pEn4QzLNzhW57J1aR\n2STnpb1XcjbF8Ah2VZ/BrcRFPcyzC4VtLBSoxWohM2djYHuoXoaogBAwzrFV\nWiuK\r\n=A8S7\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"ERROR: No README data found!","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git@gitlab.aofl.com:CoreJS/aofl-os.git","type":"git"},"_npmVersion":"6.2.0","description":"","directories":{},"_nodeVersion":"8.11.3","dependencies":{"@aofl/cache-manager":"^1.0.0-beta.20"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/api-request_1.0.0-beta.20_1532475774529_0.8599907983551385","host":"s3://npm-registry-packages"}},"1.0.0-beta.21":{"name":"@aofl/api-request","version":"1.0.0-beta.21","author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"ISC","_id":"@aofl/api-request@1.0.0-beta.21","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"},{"name":"bill.salak","email":"bill.salak@aofl.com"}],"dist":{"shasum":"51a20c3a675cade9b28c7a301d01c4fd093f2fe0","tarball":"https://registry.npmjs.org/@aofl/api-request/-/api-request-1.0.0-beta.21.tgz","fileCount":5,"integrity":"sha512-lDhNO/PSW0VweQY+93kvxr927I5pfWVfiuhAp10m8n3BMcHb0m7NIrQYBzvbdWl+EfIEjmAg47lNTb9u/doGVw==","signatures":[{"sig":"MEUCIQCHVsS/KCn7Y/LHkWXNuTa3a3ceb27+uupQjcTGXuZYvwIgH456yL00vGuBh/KmaNN61jWaKRYjKwUif4i/rCnYay8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":4074,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbZqp4CRA9TVsSAnZWagAAdegP/368PQtKcXNlXYCca+PE\nj02LF97XHepDkHCJtBy6Ov26RMHnAa8zPUvXmKi6y2HeYnHtogl8KTgXKKvb\nJuwHu2b0eW3L3+GnLJHtJcc878hIvuZ7MiKjGANIWteUDdi5O6HvFItySzYH\nCGA8FjGHyVgxXflkh2XilcSf9Vx5/b+0bbIrAXXDAnbWd9OPj9LDLUN+Myiq\nQa0WeYfHptJ+cj7s58aofr7wr+6SsOMah5UCsq+Gz5diFi1sVfJejuV2Tx1J\nRjasgNpGuvc9H4qBw9AMxH7VxTHNXA1pjws+mvecRkaa7XWdO51pe+jxPGAl\nDgBiWxI3biamFt2dpOgK4s7UIOCeJ9cMeTRd/1bt3p8CbFwbaz87RskZs2KA\nkGWl7LTLbK+l80SgWaSayGKYUlA8fhYAktCiB2169dNM2I+8Mx++kslaC19A\n6B6AAhm73w+pgWonNWL13rN8J1ipeend3a8mYnVxnOiFP1irPy/yDisJN6mE\nBbQVRaCFaGe4z3UJ9EFgnKGAz+oX4yi/R5whzJOCdJpDkyc0NWjR88H5v1f/\nUac350KJmY+lxRMgeWmssiwNBTbW40GzWqDugVd68e4uc3VHDFmUQbUQ/Dux\nJzKzDBck5Bk2tUIr/Gv3dZYJcWtksTrDZgR3YPCjjGc5k57ZiD+Fy1Cru0Zx\nPlzg\r\n=c8Fy\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"ERROR: No README data found!","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git@gitlab.aofl.com:CoreJS/aofl-os.git","type":"git"},"_npmVersion":"6.2.0","description":"","directories":{},"_nodeVersion":"8.9.0","dependencies":{"@aofl/cache-manager":"^1.0.0-beta.21"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/api-request_1.0.0-beta.21_1533454967701_0.39222893695035","host":"s3://npm-registry-packages"}},"1.0.0-beta.22":{"name":"@aofl/api-request","version":"1.0.0-beta.22","author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"ISC","_id":"@aofl/api-request@1.0.0-beta.22","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"},{"name":"bill.salak","email":"bill.salak@aofl.com"}],"dist":{"shasum":"b189b2fe1c7d3d164d658672b38427f1eff9081e","tarball":"https://registry.npmjs.org/@aofl/api-request/-/api-request-1.0.0-beta.22.tgz","fileCount":5,"integrity":"sha512-009GZoUDiPpJBBT131tuyze2Qdi4RWGVM4OAmfcln7T2zSTbo2YcFUxDjSCy/jpseHMhOeF0uwgVpYcYZjB9Wg==","signatures":[{"sig":"MEQCIDeqPGRqMMKbEXV9wNqSlsaSowHOwDTV9xkC+bpAQm2aAiBQP5UImamHylonTwCySFIauJK86tj3NZY07W1IFpqPrw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":4074,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbbeUYCRA9TVsSAnZWagAAsysQAJBD8iz4t9NJ7qsEcMNX\ni2BdNf4/gPzoFaBYUDjMyp65HUnb6TAl56mI1i0pVzrPQoDqgVY4itvfmU0X\ngaw1eifbP4fGpjsDY9W8N2BnvEq9KujWO1cyiJGOZ1j4C/8mzbpzV+Dm+ahw\nXZPXau+VkLqc3Gv7Vc+lJ8uNV5w1lyV8lZZRZMySwnKhNwoJcGazPQ25XH8M\n+2FjvoLmmZ42m5Nvmxj7WDCRpn5AUaRtOzgoYc9r1irJxc1B4e6QsXpx8WtL\ngmov8Dq4RaWpomyWCAYEN8qmg95bhhtiZwx6DezN9ZNM85oErotpSz7enNVX\napwl9suJn4TefDdeenokbibDqynoTXMzDheKzRsMUujPvo4raBqFrXQvHwmm\nmwVwYkQjCtrEKwbcBlZh0RBWjLxo8cAPNtvLKO//JGNKVTpgesR3OkNsUHIz\n6MbiUY/yCe8mDpK5VJVGgWZeafdPjgT+ByZzbhAJv2E/k8/HaGL8CBnZ2Bev\nzHOCLA35zoVCNwNe/UAxiu9P9kFd6fXxw1fqRocWXM9ODnfttR80Kqg+IE2h\n3dmZUikbrMWtwfFBa8DtDH61sXcgUJBm2rtt9wL6DfrnQ3eqmf/srtaeXDLX\nYEGhNb5o0lwFosBzo6fxlPXMivX4GoOsp5fnfHhb/SoEyXDbmZRmiEGTMR2N\nhLLv\r\n=msff\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"ERROR: No README data found!","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git@gitlab.aofl.com:CoreJS/aofl-os.git","type":"git"},"_npmVersion":"6.2.0","description":"","directories":{},"_nodeVersion":"8.9.0","dependencies":{"@aofl/cache-manager":"^1.0.0-beta.22"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/api-request_1.0.0-beta.22_1533928728197_0.38866708811758577","host":"s3://npm-registry-packages"}},"1.0.0-beta.23":{"name":"@aofl/api-request","version":"1.0.0-beta.23","author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"ISC","_id":"@aofl/api-request@1.0.0-beta.23","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"},{"name":"bill.salak","email":"bill.salak@aofl.com"}],"dist":{"shasum":"503a0681c8bf51919b0506dc0e1e7569731362dd","tarball":"https://registry.npmjs.org/@aofl/api-request/-/api-request-1.0.0-beta.23.tgz","fileCount":5,"integrity":"sha512-zkQggpzLGtBVFpcJe+gDHvzoaZMNV1+bHrYqZXTPePkePcwF5FBhVTpxII+SNtd2JL0a54YOMLYywtUvUjXH+A==","signatures":[{"sig":"MEUCICXC571e+5h15Ak+L4EV1C3sdJ/lyYn8/t8IwP5WHGRhAiEAjcJ2JG62ybvfl+KYY7OLs/14wF7ecn3JX9GqUGcBwGA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":4074,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbdetoCRA9TVsSAnZWagAA61sP/RJajBLPJU5iu4cRo8E5\nbsj3LCL+xEaUse5U5iXCavXWx4rkYoSerriowv9XqC6dOgLjE82Cret6n0/e\n6WERYYdu6wMby/Cndf///qlYgX/BwmEJsNbFmVlaDMl6+EqJrR+Iio4GsAOn\nep/CCJrJCRA+Zy+Bhiph5vpcwT0YHj7Os2/K8wqvGUMCTqAzRYR1cJPqxr0P\nOjPZxHUFsRw1IiHXI8GLtiNu+BkohFzhYjSHB3Q7CO4yYWwZ73A4i0jMlvHB\nZV3TUhB4E0wRUIO58PXXbhpH6SFJkVdVQlsr4smCWMqKwSvZ5a/AYz7uD/ys\nnXBlZRvQ7EmXU8OTNFQaljK3wl1oBfYVwB5hMQkpUOOxTk/pL7Wm8gIOgvEL\nRjf+E6NqENbhFiO8vaeiliDay3jKcq9hgGxV5RWLc+8LDS4LULWFN/9/fZYF\np6i/XbS5E7AJTAIPyQs5dI/W+X2hc2IIfyFr6nXr/QW9bQIQW6z2ssDGydkn\n3KtLIT/iQ9+NFohD+RTLyFO8LZ5ik+jBG0RUAnJ57h/q8XwostPSzFM8GVpV\n4dAXtE4jqs80pHVWa1JjOJdAHTUrxqSL5T1WRO56RKNpy1fKE7kyTMrKVPKI\nYMktrkPo6BHVOUSxdJ9+FySPstQMC/7baYC9ho2vt6UUcxBgyqViGMbuA1j4\nlEsH\r\n=IAKj\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"ERROR: No README data found!","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git@gitlab.aofl.com:CoreJS/aofl-os.git","type":"git"},"_npmVersion":"6.2.0","description":"","directories":{},"_nodeVersion":"8.11.3","dependencies":{"@aofl/cache-manager":"^1.0.0-beta.23"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/api-request_1.0.0-beta.23_1534454631851_0.639115413117967","host":"s3://npm-registry-packages"}},"1.0.0-beta.25":{"name":"@aofl/api-request","version":"1.0.0-beta.25","author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"ISC","_id":"@aofl/api-request@1.0.0-beta.25","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"},{"name":"bill.salak","email":"bill.salak@aofl.com"}],"dist":{"shasum":"e870ab49787b766d5f49449d1ae25f458fd3db78","tarball":"https://registry.npmjs.org/@aofl/api-request/-/api-request-1.0.0-beta.25.tgz","fileCount":5,"integrity":"sha512-XHDnINCF+z8JvJ70qniia6UDr76FaBAnxT3+Ksm0S9bYGqPG/uqrs5u9FlC/VZtVh1U0gl8uOjdJh1jkI6pZHw==","signatures":[{"sig":"MEUCIQDvsimviuCMyaJEyIfQP4lX2fQuaporO2FWa8nlV7s1egIgRnVgimxjX1LoxXtNN5+5LvWCPnB8VPzUA/cXY5EKNRI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":4074,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbfwoxCRA9TVsSAnZWagAAEKgP/0dswtFek7RQP5ouKWtI\nitoZKaVSpmCaqRy+FUbrnH2VJ1Nn4ZQ0c2jOLxeGh1DGHODLOxEhLfnm+ZfS\nje77+DrZ4pxjnL+FtsTDJYhb72lFqteVl0nZUuvA2aRcnUKlcQosfc4C5+LC\npB8qAGXNm7EaWcasqJ1hnos+dcXmxq4XAjYU5/zU3MkmSImyP8g8wnlurX7x\n9yucduEhyhme3O39GPOyVKiCRSp4HxnFujqqlY2bFPdQXLFy5V7xpr/5BRKV\nM5+LtQbC5Lt7sjJ/m0hQ2oy2bPn1KeqZZnA1lf+emzamCbSuxlFmbaVaP71T\nrQvmHmrElzlQS2xiH97dLjkEnH8MwUFTp6tIlsxM6fCFsxqlxqxylsx1I5vI\n8w1FVZvljFG8YDmBuf9EAv51zHz77xrOJ8ThjU10lcYHg/6E0DSWSu/N+ZE9\nFHnWwL4Z2sJiX022ffYxEHg5aT4H8p2K0gaDNQqJmlY9DLi8SPr5VI3vp49T\ntk4FwiY5sWoULn+LiopvAk+ijUMnF1Dfh7bDxc0VHGzu5wztSJD1Qu3ACbc+\nYGMiHEG4bYwqXDPxSxp4G6EQ98E6mbzbEkroa6nz87rceclHtzRKLk7zbrMU\nMjE5/MwgVWRFFMy63PQ45QiLhk/+9+nXip5B+7lOT1Oyk1dbWvcY2Y+3WkvY\nQE2J\r\n=2jWN\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"ERROR: No README data found!","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git@gitlab.aofl.com:CoreJS/aofl-os.git","type":"git"},"_npmVersion":"6.4.0","description":"","directories":{},"_nodeVersion":"8.11.3","dependencies":{"@aofl/cache-manager":"^1.0.0-beta.25"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/api-request_1.0.0-beta.25_1535052336751_0.18149647520130152","host":"s3://npm-registry-packages"}},"1.0.0-beta.26":{"name":"@aofl/api-request","version":"1.0.0-beta.26","author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/api-request@1.0.0-beta.26","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"},{"name":"bill.salak","email":"bill.salak@aofl.com"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"f3b030a28a790afa54e1b697c07b44afed96c287","tarball":"https://registry.npmjs.org/@aofl/api-request/-/api-request-1.0.0-beta.26.tgz","fileCount":5,"integrity":"sha512-r39rVXUm1bWDH/xY7LZjqgNWtduxf+U8J5EFaWOcr8+mYb2ssX0MrlbTFwufouNEYxT/t9r+0Qk4GFeuPV7T8Q==","signatures":[{"sig":"MEUCIQClFUmcmOny0b52g0b8hDQmFveVLklsCUIUQyLhmypoowIgFc26hTnvhv1514YXC3GoMdTWfxr/zpfHlGWXzyP1s+M=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":4073,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbhEBmCRA9TVsSAnZWagAAMFEP/3VglIuYt6N4uRXEdTjy\nXi+Djjgiaexs6nMF29rYpelBtOGSUhnDaaJnSnJuz51laemtdmJhZLcdI9S9\nFJd2mRl5rJYNvk1nMKbv4Z0TVuSW9U9a2F9R9lmLvFqkATGvhErgBjc5bAqt\nC6GZeKXRopmOijr96CLquFIKVrBqTsYF4a0BU9hBfT3yMAAEsEx3+yFSaLGk\nRcoNNs3wB3JNOfRyFj9W1QTMxUbctAOPmoratRwy4PmE6dyxXB2XgC67Ofgr\nhFZtQL0pMTi3vZ0of6NKpZ/wCBJuYICBR0o36K7/3mrvqskYN7J8z1hKDxum\n2cm6vWgtNZqmzW1c43ML19g33K6jYt5gVTUTmzr0XdAdo1YHHTsLfSXzD9A7\nwwtyeqs7X2mB1TlBpO9HoipkqIWQ+wz1k2VrvNiC9pY491H4J+RQ12HwZRdM\nYnDGuF2cW8E/10cyTsNm/vFmE75+iXYfBGzePxzyLTRqciofRbC9Qinvr76u\n3lNKYMPbl/y7ux4lSBuq1A4HCn62F4vbOXExfbot986xBbbsQN6Sa5XRA+n7\nHMn0ZdC62Tq9J0Zoa6JnVLkGnuh6lVC5YZOzZSVtg0CBDMqjct5k8y6eUDBQ\n067jXiXsfeSs2CUMiWVPQ4r/lUqaJrk1XGAxwC21ypBxhJhyqyKU7YtHj6N/\nEUMC\r\n=d4M0\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"ERROR: No README data found!","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"6.4.0","description":"","directories":{},"_nodeVersion":"8.11.3","dependencies":{"@aofl/cache-manager":"^1.0.0-beta.26"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/api-request_1.0.0-beta.26_1535393894128_0.9723163074191503","host":"s3://npm-registry-packages"}},"1.0.0-beta.27":{"name":"@aofl/api-request","version":"1.0.0-beta.27","author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/api-request@1.0.0-beta.27","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"},{"name":"bill.salak","email":"bill.salak@aofl.com"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"5fc2de6f1fa54f69396879c41259311b9052002c","tarball":"https://registry.npmjs.org/@aofl/api-request/-/api-request-1.0.0-beta.27.tgz","fileCount":5,"integrity":"sha512-HhiZoD6hYfRcVwxbutESQ6MmPIT7A2pgu9+UsUvclqO3ywq86gD07JQD/8YiPLJdu6goSgB8+Hl8T+C3tL9U7Q==","signatures":[{"sig":"MEUCIQCnCWhQVP+Z8KyQAtV+06HVijdqGfksApE31uufdeVDSwIgRiBomY2Ku3KaGd1/cI/Z2PjOXhvvUk+lMmxH588cj9k=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":4073,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbmAP2CRA9TVsSAnZWagAAp6kQAIpf994k8M28Bh2dVifa\ndPU7uj1/4FtNVFumhBA+REteOzjWZEq3z1mIVcxBj+8XKm2Rjqaw3c/jyA3U\nEBkqiDzLyMc9MT/59CJvDXCooECyCZeAc296mlQIVaunPGNQqxi86bPu7a8Z\n3PVzvUbphHF5V1HgxumzzYdQI4QoE0J2JolOcVZJmDBV+8i+hHJFLz73Zw16\nBeTOlq1sCW5Q3P3k2gXTi+7Gxlct/u5nBMrX/UFOffcvFeByXdzOm+wra/im\nFtmFy/0iAlnheHETCXjCPe0mMY55pQTvO5zES47pKfQCxHoJmZxiBhQh4xup\nq61cItI5O5YeuUmvQMqDSNcdkEnYPzGs4yXo44o853opxi6sYFhC7FFKL5MP\n98BvJWwuwHyHQS2SYS/dbbgvuRy2a4kH7wJucbXhmQfi15AGKEXnTJm91Xjb\nCnTPeH/9GxPE1T1byjLS+YkPvAk95Znw4EZe6Xnzf4i9cSQhdv++nr6ngLzd\ns1aASl59snrXsobRUw78TCf867KtBJJdKLqP7uuY84ZfmqWzMm9VT5yIv4MD\nL+RL+YPHX0oZRxDM/GI1QVwpExzq2tj2rNnM0sYUm0x/0PsMGo7TEXiembLb\niUcVi3pwdgp4zbcATI63oatSu8cYlD603i8Zyf7eAfUtOZ4KJ68A9xg0wmNy\njn0T\r\n=6D2V\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"ERROR: No README data found!","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"6.4.0","description":"","directories":{},"_nodeVersion":"8.11.3","dependencies":{"@aofl/cache-manager":"^1.0.0-beta.27"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/api-request_1.0.0-beta.27_1536689141579_0.6848242400160016","host":"s3://npm-registry-packages"}},"1.0.0-beta.27.1":{"name":"@aofl/api-request","version":"1.0.0-beta.27.1","author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/api-request@1.0.0-beta.27.1","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"},{"name":"bill.salak","email":"bill.salak@aofl.com"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"b46303dd286376e641e95c95455c5a14230c775b","tarball":"https://registry.npmjs.org/@aofl/api-request/-/api-request-1.0.0-beta.27.1.tgz","fileCount":93,"integrity":"sha512-pNTAgKViKOyneyOIPgRFZVMcTyvsVVyS+eOVeqsNHAgyce5IBSjQiS/6p88RjtJmza7N7h1SafpIcGgRbXpZWA==","signatures":[{"sig":"MEQCIE0v2rYXJ4OdHQoAAFBR6TaPBgsdh+CWovcNFHDicojmAiBW2M81qDWkzqvpUdIQrW0X/XT2ue7GcX/pju30Urbjyw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":417425,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbmZ1SCRA9TVsSAnZWagAAYzoP/jRcH4BKLYt2vonnRbLl\n5qJkna3WFdJCpylmCwyIPVoZATlLOPSSwuhjq3Zm50vPMM7Mx+Tpnc0+eowv\nL3endm29sDnmgikT+OuqnlMqbJLYse4wpBr8dQMp2WQBNQl+rJAT81QDwRNb\nEBBIUZ8mQhETTem9Ot4hdxDggAHMq7XsqKOYLKdEqZVdMe3Ji3ZUC3pEdHyL\nLQs8s1RBQCUMAlIDTJdVview2gqG4HuJ8gmoPXQbHCVdCujzjFul0a67YdpH\nku5nB6XkOIfjjZYDTOSVZoFGBZOn1nNvGrEzMWrtPBaZtg3UaqAyW7+Fhlmi\nQY1Az8O/EsAQYAQ627LlRzGvjYS3eG4uRrHQBkC6LioMM5gjm+SsXRAv13nQ\nPv8WAT34BsivYfF76GNOTho8A7Ufi17+eopswnf3ohn6/9PYqy9uuHWbd9SA\nqdDhUv3oMrDtHb7fjmP2fC+I8ct84YtZJaX+Eu9yc+lOULKnjjeX/w9oXFMJ\n1JkbM81aX9K8WtWwN8lB2xlJcpPHvtHVRZB+62/3WxvyujNlCiKa59b0uedj\nBEnUGWbH0yeYN73UNR4DdM6iPM66eKmtfq4eXqJyGNAP73gNDpNOdB42YEcd\ncXk5h65f1ec/8b1AU/W/NEwoO3DPMMFrvOawZ1Ag8wu+C+u1OwLLjIy8xt2g\ndSVY\r\n=E62L\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# @aofl/api-request\n\nA module to make making api calls easier. Key features include, caching responses and request and response formatters.\n\nCaching is implemented using @aofl/cache-manager and uses MemoryCache. @aofl/api-request caches the promises created by fetch api.\n\nRequest/response formatting referes to constructing a request payload and parsing the response payload. A formatter object should implement `pack()` and `unpack()` properties. `pack()` is to construct the request payload and `unpack()` is used to parse the response. Any number of formatters can be added to `apiRequestInstance` using the `addFromatter()` method. E.g. `GetFormatter`, `PostFormatter`, `CorsFormatter`, `FileUploadFormatter`, `GoogleMapsFormatter`, ....\n\n## Installation\n```bash\nnpm i -S @aofl/api-request\n```\n\n## Usage\n```javascript\nimport {ApiRequest} from '@aofl/api-request';\n\nclass PostFormatter {\n  static pack(payload) {\n    const headers = new Headers();\n    const body = new FormData();\n    const boundary = 'Boundary-' + Date.now();\n\n    headers.append('Accept', '*/*');\n    headers.append('Content-Type', 'multipart/form-data; boundary=' + boundary);\n\n    if (typeof payload !== 'undefined') {\n      body.append('arguments', JSON.stringify(payload));\n    }\n\n    return {\n      method: 'POST',\n      headers,\n      body,\n      mode: 'cors',\n      credentails: 'include'\n    };\n  }\n\n  static unpack(response) {\n    return response.json()\n    .then((data) => {\n      if (data.status !== 'success') {\n        return Promise.reject(data);\n      }\n      return data;\n    });\n  }\n}\n\nconst apiRequestInstance = new ApiRequest();\napiRequestInstance.addFormatter('post', PostFormatter);\n\napiRequestInstance.request('https://example.org/', {}, 'post', true, 'sample-namespace')\n.then((jsonResponse) => {\n})\n.catch((jsonResponse) => {\n});\n```\n","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"6.4.1","description":"A module to make making api calls easier. Key features include, caching responses and request and response formatters.","directories":{},"_nodeVersion":"8.11.3","dependencies":{"@aofl/cache-manager":"^1.0.0-beta.27"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/api-request_1.0.0-beta.27.1_1536793938143_0.48267668972902333","host":"s3://npm-registry-packages"}},"1.0.0-beta.28":{"name":"@aofl/api-request","version":"1.0.0-beta.28","author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/api-request@1.0.0-beta.28","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"},{"name":"bill.salak","email":"bill.salak@aofl.com"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"bbefd7f17d66ae30182ec95cc30e0441e4ec00c7","tarball":"https://registry.npmjs.org/@aofl/api-request/-/api-request-1.0.0-beta.28.tgz","fileCount":93,"integrity":"sha512-80gxIXKS1PM/bhU0dcUvroXhev2vk1eiEdCP9KL+32HLcb+MNXP9SwHtXJ7voadolH4UnMnowYY6lZ6+UpDXew==","signatures":[{"sig":"MEYCIQCdlFV4foGyDpARFdWpA5VJNUVO7O9lAded/D2eS8k/HgIhAIumttyB+7UGq3cDP84WMZTBtuI+i2GGEYyn9hFTskMa","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":417446,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbrXTsCRA9TVsSAnZWagAA7E8P/1CwmgMYU+UzaIF9twna\nzm0Ie4klx+/JO/T/BA1xkV8LJFybqRfWewMy6iymMpKanv0SqxrW6AYBVZLF\nUl1MohJ3vByr7MtK89wuBouWSmw4lZWZC3TcWwlR//E2/xJGE0VCge1gGccZ\nyqZsuvbndSP7T63Rj5h9rhp0o9rDEDXemlRQbPcjOqEKCA7exLDX3jK6QMNf\nQKG+b++57Ort9rEb90frAjnIsKwoSw9jLcFJ8AWtG1Wl8kj/Kwnjyy5FMLOh\na6qdaaMxss7gvrESD5m7Pef7+JWm+VpOlUcaGIDXZEfdLth0HaOedf8TFYqV\niaVSscn0EZyiCfn4HL229kYurq4bmaBCCsJPVoEgfqsUhJxt9xJkYIYlZYYq\n6TzRFlNWcaaQmagAf0K2yrPy/B0zVRBRaTKjP+/LKzZ8tA+6Wepju9al8Rb2\nBJDGeVyH4bPt92xcfdDUwLoVA+U8AXY4XqrOAKXm7edjXH4MprEEvIEgeZRV\nuBi3pdm2UWpQTBuiuF53w6nuju0GWIHEMMHJ9WG2v4/R8Suq/JckE0OOfhZy\n0OZjkuRQgwK68RzrFiH2/AwgricMp9Xo9+z2rwtBYBdwV9cDAZv0bobcrKRC\nQKe2PqU4zVh/5QJZKv5SAd+HkZTGflOlyIvxElc/8ky5eHyZUmxMpeSs1rjH\nYd6i\r\n=28Z+\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# @aofl/api-request\n\nA module to make making api calls easier. Key features include, caching responses and request and response formatters.\n\nCaching is implemented using @aofl/cache-manager and uses MemoryCache. @aofl/api-request caches the promises created by fetch api.\n\nRequest/response formatting referes to constructing a request payload and parsing the response payload. A formatter object should implement `pack()` and `unpack()` properties. `pack()` is to construct the request payload and `unpack()` is used to parse the response. Any number of formatters can be added to `apiRequestInstance` using the `addFromatter()` method. E.g. `GetFormatter`, `PostFormatter`, `CorsFormatter`, `FileUploadFormatter`, `GoogleMapsFormatter`, ....\n\n## Installation\n```bash\nnpm i -S @aofl/api-request\n```\n\n## Usage\n```javascript\nimport {ApiRequest} from '@aofl/api-request';\n\nclass PostFormatter {\n  static pack(payload) {\n    const headers = new Headers();\n    const body = new FormData();\n    const boundary = 'Boundary-' + Date.now();\n\n    headers.append('Accept', '*/*');\n    headers.append('Content-Type', 'multipart/form-data; boundary=' + boundary);\n\n    if (typeof payload !== 'undefined') {\n      body.append('arguments', JSON.stringify(payload));\n    }\n\n    return {\n      method: 'POST',\n      headers,\n      body,\n      mode: 'cors',\n      credentails: 'include'\n    };\n  }\n\n  static unpack(response) {\n    return response.json()\n    .then((data) => {\n      if (data.status !== 'success') {\n        return Promise.reject(data);\n      }\n      return data;\n    });\n  }\n}\n\nconst apiRequestInstance = new ApiRequest();\napiRequestInstance.addFormatter('post', PostFormatter);\n\napiRequestInstance.request('https://example.org/', {}, 'post', true, 'sample-namespace')\n.then((jsonResponse) => {\n})\n.catch((jsonResponse) => {\n});\n```\n","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"6.4.1","description":"A module to make making api calls easier. Key features include, caching responses and request and response formatters.","directories":{},"_nodeVersion":"8.12.0","dependencies":{"@aofl/cache-manager":"^1.0.0-beta.27"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/api-request_1.0.0-beta.28_1538094315239_0.27549989052372137","host":"s3://npm-registry-packages"}},"1.0.0-beta.28.1":{"name":"@aofl/api-request","version":"1.0.0-beta.28.1","author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/api-request@1.0.0-beta.28.1","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"},{"name":"bill.salak","email":"bill.salak@aofl.com"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"e4c9a69e27fed9dffb8401999bb1dc564c81edd6","tarball":"https://registry.npmjs.org/@aofl/api-request/-/api-request-1.0.0-beta.28.1.tgz","fileCount":93,"integrity":"sha512-d34+EylSYUVmT5qdYlWez5F15E1EnCTSK2DFRJbQX2/Z1/9P+MFEQCOwJ/29kh4WCXEQNu+eHQMzikJjXPpgLQ==","signatures":[{"sig":"MEUCIQD7QT7HSrQ9yGUWtfXEHBnPwrxHPo2CLln+X/nJ6NiqvgIgTVXEMZ9mUgXGU6r4pzuuBG/A1C/LfcGPPFOYSt5yVjo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":417448,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbrXUECRA9TVsSAnZWagAA64wP/1nEE7yn6FvCkqY18WKq\n13jbCFfinOWnXsuvoj+WSGvKsXRj0O/J1N7TnCnVQbW13utoUhlQagal4iz6\noF71r84qI616lkrnjGXu830CnWUnKOxPOHrYC54KN4gEFAYqmUfVU7Ppod6K\nF8ZNM6rdFT67BRXZ4vjyEFDgp0Stuflod8YlbFmQVDTxwqsTUxCwBFlPVJbN\nP6HzgZkZFEfCFDuasJ0wZilaGbu0nRnpjbTsco2OxKakAf6R+a9YSjceDrNa\nBUwBMgbhwZurh43Ro/Nki1tFBzimsgMSNMEPnS7YUr7QYwrONYcYWPxK3Xu4\niko7EzBj3aPgshA4PfYs9+5SuJ//LsCP52xoGVbfjeDfZqSh762vOmrh7dY5\nGurQjvCDwwTk4BFJn7ZSEN7c6ZDrESEQuTdm6H4Ozqr7UPYP5xiuWo+zmxz+\ndP2MU0zDt9zTosVZCdi7JAj2/aWHvq6Xis/GAnOHkDXegsZSdfOhJL+7f26F\n1D+tIy+V65/TPcMjPFFes4OYEFJwE6PQOBKhM/ITEX47i1tm9cl/FsXYaZuh\nSqKrpcdGhVV2NVRxXPj1ZArd4JB1ha3bh3CIJEMbOKAKm4WTod1GNl9ZKXvm\nQlydjkvSD+eA3+djbwy02vxw8+3gljj4Zxxm83AvgGlJQOR+dnYh5FlnyIsk\nhlz9\r\n=JHc2\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# @aofl/api-request\n\nA module to make making api calls easier. Key features include, caching responses and request and response formatters.\n\nCaching is implemented using @aofl/cache-manager and uses MemoryCache. @aofl/api-request caches the promises created by fetch api.\n\nRequest/response formatting referes to constructing a request payload and parsing the response payload. A formatter object should implement `pack()` and `unpack()` properties. `pack()` is to construct the request payload and `unpack()` is used to parse the response. Any number of formatters can be added to `apiRequestInstance` using the `addFromatter()` method. E.g. `GetFormatter`, `PostFormatter`, `CorsFormatter`, `FileUploadFormatter`, `GoogleMapsFormatter`, ....\n\n## Installation\n```bash\nnpm i -S @aofl/api-request\n```\n\n## Usage\n```javascript\nimport {ApiRequest} from '@aofl/api-request';\n\nclass PostFormatter {\n  static pack(payload) {\n    const headers = new Headers();\n    const body = new FormData();\n    const boundary = 'Boundary-' + Date.now();\n\n    headers.append('Accept', '*/*');\n    headers.append('Content-Type', 'multipart/form-data; boundary=' + boundary);\n\n    if (typeof payload !== 'undefined') {\n      body.append('arguments', JSON.stringify(payload));\n    }\n\n    return {\n      method: 'POST',\n      headers,\n      body,\n      mode: 'cors',\n      credentails: 'include'\n    };\n  }\n\n  static unpack(response) {\n    return response.json()\n    .then((data) => {\n      if (data.status !== 'success') {\n        return Promise.reject(data);\n      }\n      return data;\n    });\n  }\n}\n\nconst apiRequestInstance = new ApiRequest();\napiRequestInstance.addFormatter('post', PostFormatter);\n\napiRequestInstance.request('https://example.org/', {}, 'post', true, 'sample-namespace')\n.then((jsonResponse) => {\n})\n.catch((jsonResponse) => {\n});\n```\n","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"6.4.1","description":"A module to make making api calls easier. Key features include, caching responses and request and response formatters.","directories":{},"_nodeVersion":"8.12.0","dependencies":{"@aofl/cache-manager":"^1.0.0-beta.28"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/api-request_1.0.0-beta.28.1_1538094339675_0.7985240465828294","host":"s3://npm-registry-packages"}},"1.0.0":{"name":"@aofl/api-request","version":"1.0.0","author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/api-request@1.0.0","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"},{"name":"bill.salak","email":"bill.salak@aofl.com"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"1400dd1675e674b9f998130515c5b37ed41fa3ac","tarball":"https://registry.npmjs.org/@aofl/api-request/-/api-request-1.0.0.tgz","fileCount":93,"integrity":"sha512-Hjyp6i3vH+iSApQ3D2ETxHRsARsY2by0Rqb9Dtz6oXTkohRIWa62ZE1e8ZhlTnLOToicPm/Pah/7vhPbIVWiHQ==","signatures":[{"sig":"MEYCIQDpnvCG4rrXR1ExgwbVmA5nTvdbZvs4XBCnwnleWZr3/gIhAP4ptL9X/2jxhp5yVeBzhNOeg7g5BQWrI66JEtni3p2u","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":417424,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbsAP5CRA9TVsSAnZWagAAJw0P/3cLDTkotfFyJmVnSyXY\n8/aWGLSS0a1GavX5vcnOSa9VQYpM9/jBkCE1tl4Ch2PQqx01IGhCq5mDP7OR\nJtgSSh5MkNGPlx9Y3ApoRdRgFurrgkHgCJFzd1UvwaxonOtDFpQk+R0gppQ8\nq9V9WL2QRaaXlZhqK4FO9RvUYzHVEqU/GATASaxiH+xd9UekOhIOZC+jzznZ\nr5ezTwQvRBJDDXj2s7WPS9wiNZPSzGaG2VB+AkDbpRP0BdOMyV/H4oPEaY/f\nVN01COkLcNPWQaJM6uXvFRSWiy2YjZm5CFE1DUxKHiixGeg7T+MDmsDYS+Ot\n0dGN4c+vz3jRqGdbp4AEKLGqLno+xNDOhH2D4k3z5dDokyd0eY9xN35KE6is\naIMoVAi+IVKhbWYb5l0a4WwsOhhsVj1U/MQaoLecDfVzs6FrUtbMkMawUT1y\nR1YCgsfW9MHgewGXFHLi6JbPRWewkst2mwPCwiFJUE0wKMIGLXx9vd0KYa+g\n+gPPPwRAzZVY43Xc4NLg/R6QTTsZodwNAr14HOqQ4lx4+I8z14YZtxlwhD6v\n9EP5NCzFWHUAQD3a0yaicSCfweR6GfQJ3UarFtp6jk9Olx/KRxmG7y8GWCJS\nw0xz40eODNY0Lf9l4RLL4uDnojf6xEfQvTN/f5raOSex09y7kKGI/UbkMQx7\ndfS4\r\n=Lg9R\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"6.4.1","description":"A module to make making api calls easier. Key features include, caching responses and request and response formatters.","directories":{},"_nodeVersion":"8.12.0","dependencies":{"@aofl/cache-manager":"^1.0.1"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/api-request_1.0.0_1538262008912_0.1757520561880075","host":"s3://npm-registry-packages"}},"1.0.1":{"name":"@aofl/api-request","version":"1.0.1","author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/api-request@1.0.1","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"},{"name":"bill.salak","email":"bill.salak@aofl.com"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"9f53a5fc68cb12f65c7dfb57cdb63a9956546ee5","tarball":"https://registry.npmjs.org/@aofl/api-request/-/api-request-1.0.1.tgz","fileCount":93,"integrity":"sha512-I5GMXPYlo9gry69ssw26/4PgWpVuUfsf4QWfdoM2L+Q8HE9uE5NORJiiNRbtX/gcoVmTJ70yWz0SSRDn9/6QVQ==","signatures":[{"sig":"MEUCIQCN76qv4c0ydEK3Mg30XE4Xann59osROSq3dQRf5mGRFAIgPSjoYYMgQ1b6pVSBxV2HwUbOC/uOcRFh/dfiFnl5CqI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":417424,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbsAY7CRA9TVsSAnZWagAAZQIP/ReZ3pyEsCjQvbz0dzJy\n5zgKAEgh1Dru3ehTPOYFfUuqp2D0vKtMvvvmnFXLyghcE4tGL4ba6zfDqF8W\n1C54OlQCGPOqY8nyPDu+GIg6pQQIXS6RPFCJKsVGRxtVeQp5QrZvZ2M8+g8S\nrLsxAUXzYxWjrxB2EpgfZXbrCS8mdizb/lz2OUSfXwaJ7dAMOUi0P/pp6L5X\ny89VaKaVWvj3M4lPCfJ+mHl2V23A+sShcFlRbHQMJ7qIXKavFMj7d4JMdgfl\njwFAfHJ6o9hI4c1UmUV1t08d84HXdT2PoeKkxi1Lv7MAtUIvKyZU0+rG9Cuw\nJXvH+8eIJFWw6KuRYsN6TAW1wHtFU61zja528jlFdCccR2QU+/WWFzPrrI4l\nJtEWhM+G0cllE1NjNcvvIBcQVUjgi01P8aZ7nDOOJr09YeCdkmRAc71r/I+f\nQnIFuIiA5LnUxwWgMpQf2qDZXwbvgFza8LROnh2xH3rTKOcQV+Ah+0EuL7tG\nUlFUkjm6L498q52Y0PIBt9R8+GVF2k+eV5ioyKDuPnKjWBGTTLgZzJKB46lV\nncvc4wTKfA1BW0vAwE98pPyiPo/d9+6XE1Nbj49BxJ6vR9kWdePn5frFHhu+\nPfsFXQUXfnAuJBCm6z0a8HNYfGPgNkF0eTbyHMmVYwaW2kk2MHIwiP00I5Ak\n5NJY\r\n=MbmV\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"6.4.1","description":"A module to make making api calls easier. Key features include, caching responses and request and response formatters.","directories":{},"_nodeVersion":"8.12.0","dependencies":{"@aofl/cache-manager":"^1.0.1"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/api-request_1.0.1_1538262586801_0.7316581932683985","host":"s3://npm-registry-packages"}},"1.1.0":{"name":"@aofl/api-request","version":"1.1.0","author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/api-request@1.1.0","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"},{"name":"bill.salak","email":"bill.salak@aofl.com"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"eb846a2a7397a2c732c3649d4cbd772059fa905d","tarball":"https://registry.npmjs.org/@aofl/api-request/-/api-request-1.1.0.tgz","fileCount":8,"integrity":"sha512-BHshcyjqJYffBIfYePuO5pfUFHd2uvbndlog7jc09UtHtLw3UgRLZTxgTBVdSo7ZsfFkfJQaVGh//7pgYMPxDg==","signatures":[{"sig":"MEYCIQCcuYAH+k7hNU1fSoMWG71W2IHk8yW3u5dLE3rXRFkl4AIhANYc5TbOZ7huvii0UCXEGHZvtb2Atbcf/wjxpAW3IkbS","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":11574,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbx7HICRA9TVsSAnZWagAAzRgP/jc5lH3IKhdjTtPaXa3R\nMWKFsPAt8uA+oH8fQShUdaOqdrZUG+SfjkUBRQaoaQLkCkrbJgHah9WCHpM5\nCENjwQg7HLPlTN5XmqQ4d5Igz/9lnQO+PQJYapLGUh7euugiSIxq2UPztoEm\n+jkJGNuQuDdjZGgOZT+/kpFQXUgJDVkvkkp1yoN+I+fOAbNoe0g5paG09Qc6\nq8+Wp3BuM/oTcrK75ElUyRrB6MVNBGuWvZzIHOMouyd84XpJd3B7YjSIwPuB\nPKB2U4EAvnAXTRMxzLODaZ3pPwmCrnr/O84/XaC7C7Js443I4b155xXfhrsn\nKSrMEDM7nyyhrh5ezEyszvZk5Vvs5+BjrbedkVJXzj5getlxDSxhq5DnUUFl\niFe6Y5VQaqdUcMkGc+z80715nWPn/+06uYmMwqgomymjR/hVD5NCIIXzsurs\nQsvOIcEC4PnqD0PXOGq8fm9f9up7gbaUfTTTnWI7UzvsEUFdLGHTfgAK18RJ\n+xSi60QDxffyfpLlvz2p2t/oWQK1DT96xGioplztGzhdc6VVF0wx1FI0PJfi\nAckQZkotqb+lHRYtl46tM5th9UqXpYFGoUq5bz1xbvj0Qkbx6c7X3LN206KP\nJa7rMAt2tYP4gizfeXbgofGn5/doBHOrZd+3Mu6YOJ9aPk4RXBRglhgAGQiH\nng/t\r\n=gm7C\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"6.4.1","description":"A module to make making api calls easier. Key features include, caching responses and request and response formatters.","directories":{},"_nodeVersion":"8.12.0","dependencies":{"@aofl/cache-manager":"^1.1.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/api-request_1.1.0_1539813831984_0.4071055998148745","host":"s3://npm-registry-packages"}},"1.1.2":{"name":"@aofl/api-request","version":"1.1.2","author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/api-request@1.1.2","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"},{"name":"bill.salak","email":"bill.salak@aofl.com"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"c7b6048b9799eaefbcf5d63fb027cb08a14a42ef","tarball":"https://registry.npmjs.org/@aofl/api-request/-/api-request-1.1.2.tgz","fileCount":8,"integrity":"sha512-x7bYxXNyI3sA/7A/ZWGHRIwyOiY83jTup3G8ngr2bjKwg8J0mRijX86rTWyQ7SRi2NLE5v9w3leMmblfXdV0Rg==","signatures":[{"sig":"MEUCIQCT0gs2L3MDMmtOgcbDf1R7b+f0C/qfRyEUYg0i6QoqIgIgRjyhgQ4XIyCr7hAIBEkSCJJkWk3yA5V0sFQKqPuBm7E=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":11582,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb12AeCRA9TVsSAnZWagAA8WYQAKH/6j/Ys+8cqe79vmzN\n9VdSXiz+elvKtztp1f4LwGZ6fBYBKYlEe9h33br+3p1+KAp71ZRUaOI7H3Fc\nCqgy/ss6oPbZdWAo+nrCaofmHyDASJIIvMpWNAhaSCd82ffXlsyQS4NwvYWT\nuqM4AoKZf4FflPdivC2p4/E7dTh2DJoGlGLyWB5VI+ytA7ckKdgrB6SQD7pw\n7T44qS/SX8Gx5MbLdFUtyqgFSXIpQaol7sBqUhKW56Mc/6oZc7USX87A6SlJ\nAW1aKKUvNOjF1nHtZ7CDRgEa0GC/xOIIAKjpEHX4sQbTLz8l7jJNtLgGfdqc\nU3gC+9lMchGkQc/t8gg1c9jn18XOQ+WvohZpQaNA4roLmSwFPmqG1rBF/eBs\nj2vb09xhig7T47k0J6F3Jzwojd2JF7nfR/gKUv5eMcXpjgOtA8GrUwQ1kU6O\nkOIx3mtERo43WyoPRH7dC6VvIJKY7Pbi6aOBVzoEWfGemd4l7gZAMp0BkKQK\nZQg6SgMUzGo707IYrr3VBW0rCTpuXQgTyaWtp0zIWJ2QyxvH5T/RacRr2VRs\nosM7oW7fslRCxRKtwf2opV9XP+4YJBJrO59gDP5rxufzrgSbKJ+kapyGlL6I\n1YOuhTpfX2JhddKl5Bj6x6dfLcriHAp03HNWX2SJoPQK4wrAjMCOFns5HerW\nO3OA\r\n=IYOt\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"6.4.1","description":"A module to make making api calls easier. Key features include, caching responses and request and response formatters.","directories":{},"_nodeVersion":"8.12.0","dependencies":{"@aofl/cache-manager":"^1.1.2"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/api-request_1.1.2_1540841501503_0.9902663587387015","host":"s3://npm-registry-packages"}},"1.2.0":{"name":"@aofl/api-request","version":"1.2.0","author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/api-request@1.2.0","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"},{"name":"bill.salak","email":"bill.salak@aofl.com"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"8872ab61a9f0b21fceed9fbec2486c31119e25a4","tarball":"https://registry.npmjs.org/@aofl/api-request/-/api-request-1.2.0.tgz","fileCount":8,"integrity":"sha512-hlwQCZnIkNUEYn0s26JCKieE1PB45lzxThkYc3I6vPmMP3msmjWPjtVQupCo3TMcyksRSjibGGAktrmCtuDWrQ==","signatures":[{"sig":"MEUCIB/Qj0kmgQqJO6QZKuOm5CQxNvk12zHg2l6fAPvxb0hYAiEAtKWmQ11bg5P3fBBh/io9nPErrKlTmUCxkPIgQMdOTb4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":11582,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb4f13CRA9TVsSAnZWagAA900QAJNx+Jk3Y+jRxxJbZOTu\ndaQra3+CWiaLq3JS8NgB0V7zyQlhukpIziwXNfiwN2cIWNYEUMz7sGTH38jI\nndmHYoRm5wYsHdlhP9n+nybtrGhH2C0YKLTnmda5ZiM/ZUauzZFU8eJtqqjk\nWDORDKk30gn+iySBA/ksOBBWcX+xW+JrYVhFIOK/eFd3N4f59PbEBYoWGf/Y\nRvIxQ7GSvdizER9bmEdcCWivCLHSbx7BJEoA9lJmJAuaKAPzRErwoCufEfwm\nJ3Ecy8SfykVYyUEAaoGOp+ETqyw6ajjQFFFyVfpZihaCHPqFlWaF1DYUeib3\niao2AYVy4s9L9dDDppCQFSFhCPifTf3aShikgNN5BT5YUAdTueG+hsID7K5v\nbc00Jhf4O6TGMmdYE8b2XjEP72uUiCFAN5/PjnStErZG+w9a/kFFOyPCt3X3\nmk5VDWyMctRGcu+SlKVrJ3NVI8Q3VKyFXwLNJD7F61ZG0d6LhUtfoA9Sz+C6\nVkvQVHvwPtWFff3w3SQvkOjR43CaxfN1fSYtlXhoQ0wya01W5aC54H13kKHh\nLs/HNf0b51pl7T4x9jkb2BCEx+h0dvcd4q0bZv4JHI4/lnnCBXXH6HLjqboV\nUB6K0x4kpfLRzaWDGBjbR8zKXQaVPtUSvbwe/fmTN/TbuhJamafqV09pk4td\n4onN\r\n=o7L1\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"6.4.1","description":"A module to make making api calls easier. Key features include, caching responses and request and response formatters.","directories":{},"_nodeVersion":"8.12.0","dependencies":{"@aofl/cache-manager":"^1.2.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/api-request_1.2.0_1541537142502_0.8325948746184897","host":"s3://npm-registry-packages"}},"1.2.1":{"name":"@aofl/api-request","version":"1.2.1","keywords":["aofljs","@aofl/api-request","api request","api","cache response"],"author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/api-request@1.2.1","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"},{"name":"bill.salak","email":"bill.salak@aofl.com"}],"contributors":[{"name":"Daniel Belisle","email":"daniel.belisle@aofl.com"},{"name":"Micah Blu","email":"micah.blu@aofl.com"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"b8bbb3087f729ab20f399f0ca5e3cdd613d4d7af","tarball":"https://registry.npmjs.org/@aofl/api-request/-/api-request-1.2.1.tgz","fileCount":8,"integrity":"sha512-ZrAdcGmDUzgLQiEouNFUcCD7lz9dt/GanhQie9PapgOEwP8+RfGuDq0TV0YraTNshnS1lO+yUCE87l+a+gZwIw==","signatures":[{"sig":"MEQCIHTLD66hIdawUse5u2h5ujHdXdzksqrv2EbJVQhC9cgyAiAA+JOYKPyetRFWGF17Wo1devgAbVC/7nyZh/bv6pBW4Q==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":11828,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb8dQRCRA9TVsSAnZWagAAw9QP/1nRF2qbi6cQIPZP1StL\nvaks9shfa5N1gW+uKIUyS7NxzUY9ntAdAPx6/4bD+pnPFo6Duh99V6SiVwGT\nz949i8uU9yUco6cuXwdUlFiJ20naBXYDTOWvClMVhosH6LlcmwvSGo3fr0iU\nlDr5+3wD5fTahnFO2vR+/8/1QppUlTlVNjOFgjBTy4tS38yvG0VrrCpePzYJ\n3kiqb4MErOekeId7AJ7iez2hiVxpqXLD2cNyvx4BBFormR22iNZJwqB2NsFG\nINFMc3y1RSoA87fPZEzi2CxHk5/OYWQCUmDpkJmZ/+TzwqQYD8jvSS7OqX5M\nZ6pzYDxCk+QxKfus9ShbYHHUG+9yV+wBb4ukGsV9CDHqKAOB7dz5viS58Ln2\nvaUU986igscMrRPN8LPA2vAOzS6TNXeEnpgAVb/Ovzr9n1P82klpj6PKOITL\nZlN7fRxV79ariVjDjooWO//HtisVX4G/+krfMt1yM/oJWUVOvEdrCY99K1qO\nsBHsyxzRUNxVjmIhNTD+RrME2QV0AzlM4lVCyYsDaa6/GC8BUBMGtKXqRQ67\n+vjX7V+4rAjvKPpcqvwK3CFquKZsnP8hqJR5LsSirEgBWi6pk+BmqhPD8xGw\n+uxhuzJlWP/kyBAj3xdTPYJXEtOfvLE+Dcen+Gn7LhUhFD5rQJg3M3g8VJo6\nmmXU\r\n=wW1v\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"6.4.1","description":"A module for simplifying api calls","directories":{},"_nodeVersion":"10.13.0","dependencies":{"@aofl/cache-manager":"^1.2.1"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/api-request_1.2.1_1542575120743_0.21870156099884674","host":"s3://npm-registry-packages"}},"1.2.3":{"name":"@aofl/api-request","version":"1.2.3","keywords":["aofljs","@aofl/api-request","api request","api","cache response"],"author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/api-request@1.2.3","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"},{"name":"bill.salak","email":"bill.salak@aofl.com"}],"contributors":[{"name":"Daniel Belisle","email":"daniel.belisle@aofl.com"},{"name":"Micah Blu","email":"micah.blu@aofl.com"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"3fd398f739f8ae322f7e31513772291a4b7f811c","tarball":"https://registry.npmjs.org/@aofl/api-request/-/api-request-1.2.3.tgz","fileCount":8,"integrity":"sha512-sBZ62+x5WMy7WcmaLOu4mEJXxu6UZ3X64RtcTfhinkXwpro9kHfP4QABt8O1EfQzW+Hv/yWc5C1lETo4UbzGAQ==","signatures":[{"sig":"MEUCIQCLf0FG49Y5jvuzTWoylKnWPoJaE3tfxH8vtT4NxaSXxQIgSIiIlUeNSIVKqMTNNVT668+vxLb9zGClVStX1G5/dkk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":11828,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb9KQYCRA9TVsSAnZWagAA0UYP/RV1jGZR/GZcjSTV/J8w\nnOZMGEXHArH16Z0EnPP0a/9oXun7jVE9iI/O0CwlRUsCXATTPM9OdR+iFLRb\nvLZZ0j0+VP/NDfQ42Mi9v1+Fykc8gVPxL2BExjyqlqsx9ySupRCdNBYk5x/x\nxGL3t6H8kYZ9MiBeHL1M8VgY9isH/qRK7xHX7rjXeH8s8JARNoX1ECq/bxl7\nkLLuO/kWkckfQZ21FCeAc3wASoyftsr7du/m12OIZ0QiN6V4PnoqH9NYhGv+\nOn6xz0V+dvoIRICwGBTF6c6/gXUzj+izmabERE/5UL983Svg/Mu0QNqZMLnb\nzQKKLzYChhxKZFvCNMpXn1BYq8GkReL0FbXMNjwqHzyQt+nfCCRGN8A1mzU1\n4W68sYLGDOYwdVyP+h5bcjn390k5LA6OGwypxG1gd9TC//JzU0e1Sha9anm4\na7LzlZEUP9rylmvvJXftoscjhrk5ScwPT/sKKUIiqE27klDkUF9UpyhL+DCV\ncHOKl7nIlD0AdBtddysegTOVqcxtmbIHF6hiOs+D0vGjNfnPwj2VIrfLaXGI\n1K5oG4j0kA1shQxU0OmrZjuq1Bq36yMHzSQ1psMCu+zcGaX9J+m57j2dr+Q3\nme0NDFRr+F3abUKXAwRBAa6b3qloSUxb/iw+xh3rd1h1skVY4WA8nzvz6+fn\nXFdf\r\n=ulVP\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"6.4.1","description":"A module for simplifying api calls","directories":{},"_nodeVersion":"10.13.0","dependencies":{"@aofl/cache-manager":"^1.2.3"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/api-request_1.2.3_1542759447837_0.4564115268831319","host":"s3://npm-registry-packages"}},"1.3.0":{"name":"@aofl/api-request","version":"1.3.0","keywords":["aofljs","@aofl/api-request","api request","api","cache response"],"author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/api-request@1.3.0","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"},{"name":"bill.salak","email":"bill.salak@aofl.com"}],"contributors":[{"name":"Daniel Belisle","email":"daniel.belisle@aofl.com"},{"name":"Micah Blu","email":"micah.blu@aofl.com"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"dfc207c766934853f2d8d0e9e41aebb1c82a109f","tarball":"https://registry.npmjs.org/@aofl/api-request/-/api-request-1.3.0.tgz","fileCount":8,"integrity":"sha512-QHRIdFpJbKoFKDwZuQcF/9MV2k4Sm00uTvm1hVmVbH6NSaMpAv80AuFJSBrK254q5O+G8cjYHH540XsKtSa/Ig==","signatures":[{"sig":"MEYCIQCnPjPnw9Cpzem45Iv/QdQbYz/KoxmMI8yaK2YU9VL5hwIhAMqwssNC994bGLPlWfU14Rsz+ehiM+IU1+UtsgiRZg0P","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":11828,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcCY1iCRA9TVsSAnZWagAAdkkP/1nX5eMaorPIAQ85Ksqq\n5IJHDDU9Y95R4lqj24X7L72dePHWlnaCyIWPnQixmzvvuUTACBbycKDIyYkB\nT/RwqdKHk3lgp5LkkzkGUCQ9RKqM31FRh90+BOAl6hDEpcrOzEROm+OOVi/8\nIqu4VPz87oavyXc8zIG1hGFlVEtdfYRIXb4mVMipi0Pg9Jg1ZT5Ct70uwyWf\nS2yoerDPGsLLD63Rgx7dGceUYqOMRr5PmW+WrjFmKzkNW+KG6uErIyomwGmC\nxStqaw1Q8sMrMVPBP/rwdmtVqMHxelCSQ9zQSebSWnd+GTIC0+jbPB7Ki7no\nmRNfEJ0iqSXpVfjAK+rMbDsSJXzPH8jxNTzkOwglcSueANvo7gEYWE6v6aj/\nc5dcmOYsKbYLYS55aYs8N5GtOdhznB+YGhcjOnvL/YWlHkxe9d2d1eBhTjQp\nt6UiBWuUGfDuOgOyCkdctTVJBSbIvOMLs2fde0yriaRlbQqFg4NcEC6aZEID\nHkFCl2vDFHsbKH2rlSPgGmAG9KRn1EMz5Lzu9loB+LkI0vr8h7FM7GtFmeYc\nNIUK+w+LGJwB17TJhjrp5AUsrCMXu8982eNx2mp6SLK3yAI6Hglys2DBDfo9\nqiQOj7AeQYi8uhgDI0T0tK0ortFI8gPIL4H8uQmOvLzhA9B2LbHXZL7bfVPT\n69u3\r\n=t96h\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"6.4.1","description":"A module for simplifying api calls","directories":{},"_nodeVersion":"10.13.0","dependencies":{"@aofl/cache-manager":"^1.3.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/api-request_1.3.0_1544129889726_0.3748307999823579","host":"s3://npm-registry-packages"}},"1.4.0":{"name":"@aofl/api-request","version":"1.4.0","keywords":["aofljs","@aofl/api-request","api request","api","cache response"],"author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/api-request@1.4.0","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"},{"name":"bill.salak","email":"bill.salak@aofl.com"}],"contributors":[{"name":"Daniel Belisle","email":"daniel.belisle@aofl.com"},{"name":"Micah Blu","email":"micah.blu@aofl.com"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"4aeb1d26ecd535a7426748c890f8bd1027780378","tarball":"https://registry.npmjs.org/@aofl/api-request/-/api-request-1.4.0.tgz","fileCount":8,"integrity":"sha512-jUhHrkY7aIVs16I0lU77P6aUrkIC1wne+TMTANPTMc/8wIh/WtIgGe3k8kp7p/a1s3NdtR/6rGKVFUux2wa4Bg==","signatures":[{"sig":"MEQCICJ5OgVZT0hzggpX0bD1nlSGbUfYkBIKf66N+j5UjaiHAiBFcAvNjzOqDI5TTNIldTGaJjLsVbQfk+6ODf1g2S4TaA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":11828,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcJYxXCRA9TVsSAnZWagAAJ9QP/1XCG3Ky6QM2p0jsA/gC\nK9rEEwsJqx0EUmltRvu/k2sQx1Rompxnp+XhiykdzKZIwG2+66sY/pMJR/WD\n6sn7lfWVQAtsR5nDr0RAr7cH6CETpQUr77pYJU0zR1+WJNBK3S5G+Kt+PL41\n3i0prq68S47p5mUP9+46mtf+O41UcV5EMzPF3tjukTmyNonW6zwPD1K9Lyx6\n1lbfJ7g9ZXMLYw+e8ZGZBRq23p8dFrntpD12tdUkJ2AE/LjO7WqQlNCffT/O\niUR5b+uqKKpfTo15bncrYpb+kJ8jwtoZ34t1DmGWrI251AEoOAK54f3qLKDX\n3i3T0n//7hQXw3+IW4kXj9TFomG/I0vxoAdEb3ozmig/WIqJBu9aP8vcDLhU\nvVP1AgV1J6ScIlrqq5xoPx1av5JSNKO4NyDXb6B0Bye+8PuCEK4gZh8twmws\n2bwWK5QzILEWBo7zZkc4gWYB1Ue/eFd+dKhcDUFkxKnOVuPDu7LrgaNtY76k\nPenX261/kIfszV2uGdyLw6SygaVuULHWxQVTcYNqra+5uFhH/UBV4A64+5fD\namIZpk3COAnS6P+pe9IWRmdqJPbsSohGvc5nHikEr/Nas5juHL0rP4e2piys\nRJpCk1nPUQS5o+hrozLwM6y5YJWEivO76oq99WqLtyz/naMWd/K1kWT1co8e\nrTIz\r\n=YHl6\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"6.4.1","description":"A module for simplifying api calls","directories":{},"_nodeVersion":"10.13.0","dependencies":{"@aofl/cache-manager":"^1.4.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/api-request_1.4.0_1545964631060_0.26343861322700657","host":"s3://npm-registry-packages"}},"1.4.1":{"name":"@aofl/api-request","version":"1.4.1","keywords":["aofljs","@aofl/api-request","api request","api","cache response"],"author":"Arian Khosravi <arian.khosravi@aofl.com>","license":"MIT","_id":"@aofl/api-request@1.4.1","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"},{"name":"bill.salak","email":"bill.salak@aofl.com"}],"contributors":["Daniel Belisle <daniel.belisle@aofl.com>","Micah Blu <micah.blu@aofl.com>"],"dist":{"shasum":"d385d398d564873b03219c99fde4c78afb9cd946","tarball":"https://registry.npmjs.org/@aofl/api-request/-/api-request-1.4.1.tgz","fileCount":9,"integrity":"sha512-UHaYqu6Vhc+ZSoC4v2cg/HQ2tyX1Hp1Eb8itupNpXowg4JW1cwI3yydmW/JaBDVNtgHpUQnj4IFSTg7BGI5F0w==","signatures":[{"sig":"MEYCIQDBdLks6O5PYeuqpky42jlapQSDYS2OqpV3ONwV1SrzuAIhAK/I/Zu9DCPav4DVO43MOM9X7rm6d/plrUEm2QPb1bPV","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":12966,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcM5t5CRA9TVsSAnZWagAAys0P/RWZhuqVXt0V02kXJaOe\nwX3D1o+x+RxqjYvuYkotVRjrr68d7VuWnkWjKlibttjOsbwt/Tvs4Zn+8QV5\nICGCAyZNT+Dc55luYimM1BwcfhXwQdc6Z2/0EtQt21LLCLMChLCTn5Yk7bQQ\np0zdjCseMKXprmSwy4zY4NmVplXXMBDKJovni+onrLoWuKod+MpDIqPFwnDo\n3g46pNr1v3h2rF3l/ixJ5+BnDWoejiafKyvttKh3jDqjZKIv2oiWsK2x0eo5\nR2q73HfKC4laDrmdlhNOD2UrJ2Bj4sQusN95YLQiKpX2Bf2XtaSCxSy+gqiF\nGL19gn1FCzaNbjtNgq0rnoMebcNUZ58cfrU0rJkH7bnO6vVT8yxHeJ+jv+EO\n+ZW/nJlXIZUK0OhVJAt3XK84m75EPsvEytv/2XWSN+6Dodc/hH1ScE3N/i/r\n94QXksP41c+6mK4p56ttknSEmGvagKeYPwjRWV6KcYRcRtos08lsKT09URZm\nRScZZYa8vPke9NIIqXG0F5rWqffYUDmOQYQVasTHvtt4Nmv0O0rULw8fAVuj\nHppFqHRs5zS5evpcf7yzGn7P9F/efU8OZfQ0eA906s/xkdGHZ7EFeffpLVcx\njKtxfEQc4aF0Q4GAk2FRjKKJfc5c12ZLfHC/++8FwdfDjEG6QQiHxN+UHA7L\nmn26\r\n=5p0J\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"60297b316858cd061ea1c221a7e04406b910ef38","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git@github.com:AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"lerna/3.8.0/node@v10.13.0+x64 (darwin)","description":"A module for simplifying api calls","directories":{},"_nodeVersion":"10.13.0","dependencies":{"@aofl/cache-manager":"^1.4.1"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/api-request_1.4.1_1546886008440_0.8237715999790887","host":"s3://npm-registry-packages"}},"1.5.0-alpha.2":{"name":"@aofl/api-request","version":"1.5.0-alpha.2","keywords":["aofljs","@aofl/api-request","api request","api","cache response"],"author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/api-request@1.5.0-alpha.2","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"},{"name":"bill.salak","email":"bill.salak@aofl.com"}],"contributors":[{"name":"Daniel Belisle","email":"daniel.belisle@aofl.com"},{"name":"Micah Blu","email":"micah.blu@aofl.com"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"401442cc8e779c6d6468727f7c7981d8bb7b42c1","tarball":"https://registry.npmjs.org/@aofl/api-request/-/api-request-1.5.0-alpha.2.tgz","fileCount":9,"integrity":"sha512-0kATHaraoeUxTZbsfpWnsONz572j7NRmFZXlx9gyBAG+ng6t8yUyHwOBg8QTg8uQTWrzXTIToj2YLMCtbF9U6g==","signatures":[{"sig":"MEQCIFX8Gm4j+uLCJQ4/4geqirPFs8fJX6SboPF4vCI/jyf+AiBRkB0dkgP8deoQQb8V4Lsfzb300C8LzkCiPky94WTYXg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":12982,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcQQe2CRA9TVsSAnZWagAA9d4P/3nnAm1xJFtweBsO13MH\noCqAZaOixKLdPdq369cK/DhsoWJDGueTbtT2J9cLLFVxxDPzlfexC3U/mHtK\nFnF1hU09tjNHa4ciT5jIhHjXgwJkbE97ZGkuooOTBfxIGNMT881Xs0kx1Xoj\nC/YTFuatSVEcm3jPzqps2AIOlIQlWpqKhSoFL+bqE+7myq7KowhccM5zEMzW\n1iafJJ7gSXJRqpgT4XAamEnUyFQ3u136LyaNg+3HmSaR4aleFVeIIQeS/ytL\noIjp87CQaqA2uWPOhOpwfRN4/zAGNvJl+NWVGNobNLvBcjrMgo37fzwCti++\nwfrFmfimy4QlxH8rBmZao7vQ/Fav2+GADNLIFvTZVL8m0f2S8m6f3eeFHkKr\nmLN/KrOKAAVnd00fr6mB2AaLqI7hFE9q/JASvLfpkuqVDRmnGtEGdQae7p7W\nKrh7DW2qXYz2R7WZsRA3CmFAX013w+oM8huRooCN0bBX3BGs0OY3qMkI5G4l\n9ORaL4ZONLFzSJwZvT9EK3Sf2ky9zWNFVJoZy9oFA299fekOo51STi63Am1F\nbfYkCgWsSJPckvAN7SsBBmOk24SRFz4gt5xoOF5ILYujj0Ibno67YFrx0BYk\nwdWBH3FHhRC1VjS/NFOFx0HzT70VIgNVO03E0ZI99RC0IE1PJQ5BNX4wfZYb\n+1qV\r\n=XfSb\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# @aofl/api-request\n\nA module for making api calls easier. Key features include caching responses and request/response formatters.\n\nCaching is implemented using @aofl/cache-manager and uses MemoryCache. @aofl/api-request caches the promises created by fetch api.\n\nRequest/response formatting referes to constructing a request payload and parsing the response payload. A formatter object should implement `pack()` and `unpack()` properties. `pack()` is to construct the request payload and `unpack()` is used to parse the response. Any number of formatters can be added to `apiRequestInstance` using the `addFromatter()` method. E.g. `GetFormatter`, `PostFormatter`, `CorsFormatter`, `FileUploadFormatter`, `GoogleMapsFormatter`, ....\n\n## Examples\n* [Basic Example](https://stackblitz.com/edit/1-0-0-api-request?embed=1)\n\n\n## Installation\n```bash\nnpm i -S @aofl/api-request\n```\n\n## Usage\n```javascript\nimport {ApiRequest} from '@aofl/api-request';\n\nclass PostFormatter {\n  static pack(payload) {\n    const headers = new Headers();\n    const body = new FormData();\n    const boundary = 'Boundary-' + Date.now();\n\n    headers.append('Accept', '*/*');\n    headers.append('Content-Type', 'multipart/form-data; boundary=' + boundary);\n\n    if (typeof payload !== 'undefined') {\n      body.append('arguments', JSON.stringify(payload));\n    }\n\n    return {\n      method: 'POST',\n      headers,\n      body,\n      mode: 'cors',\n      credentails: 'include'\n    };\n  }\n\n  static unpack(response) {\n    return response.json()\n    .then((data) => {\n      if (data.status !== 'success') {\n        return Promise.reject(data);\n      }\n      return data;\n    });\n  }\n}\n\nconst apiRequestInstance = new ApiRequest();\napiRequestInstance.addFormatter('post', PostFormatter);\n\napiRequestInstance.request('https://example.org/', {}, 'post', true, 'sample-namespace')\n.then((jsonResponse) => {\n})\n.catch((jsonResponse) => {\n});\n```\n","gitHead":"069f56d81a39ff1cdcd698c4a3227e36f2c5a1d7","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"lerna/3.10.1/node@v10.13.0+x64 (darwin)","description":"A module for simplifying api calls","directories":{},"_nodeVersion":"10.13.0","dependencies":{"@aofl/cache-manager":"^1.5.0-alpha.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/api-request_1.5.0-alpha.2_1547765685960_0.6044935374477651","host":"s3://npm-registry-packages"}},"2.0.0-alpha.1":{"name":"@aofl/api-request","version":"2.0.0-alpha.1","keywords":["aofljs","@aofl/api-request","api request","api","cache response"],"author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/api-request@2.0.0-alpha.1","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"},{"name":"bill.salak","email":"bill.salak@aofl.com"}],"contributors":[{"name":"Daniel Belisle","email":"daniel.belisle@aofl.com"},{"name":"Micah Blu","email":"micah.blu@aofl.com"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"05ded40ff29dc08a02d53ed6db22fc0260afa4df","tarball":"https://registry.npmjs.org/@aofl/api-request/-/api-request-2.0.0-alpha.1.tgz","fileCount":9,"integrity":"sha512-JfT71FK3Szd+Bcw7lWDR6MT3mLoKtRIcx7TzshqEOZ/ZKKgzYhNxT5Pt5J8pvPy3xrr98O0zUBZafCLsRbKEAw==","signatures":[{"sig":"MEYCIQDvFkSNWx7egNW4FzHEHp5wls4TutahT8mJv19xKT596AIhAJnBHtS2YCQhCPfJGkB/VjO2cJNEGkE6NG9+93pznFj1","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":12982,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcT7I5CRA9TVsSAnZWagAA5CgP+wVgm8BZShXORzTxYfbU\nUdpglLx3tCCHbDQwqJC58mf0Gi0yJB4ueOSpuH+I/iljDbMwAMZJ3Ulg8BEl\nGMU0ZJx9o3cNo0AF/XKc4lk4p+9C2iurFv6wyWv+Xo3jDdDDrvLyPCQ5LjJA\nzIZAkMIzuIOctb8zjSh8TFrYDLdJBnwJ2/zagnOQWRr3OrKI0E2UVHCuec90\naGsBtnACSVImBtHVc05012HhfseeQPnPWhOQZj+EIk3AdM3ypWpTB+pu2AiT\ny6UvjetPAqB54wCMmmmGX5nJm5z8nglT8zJvj4opjwjEFVZbmD7/6IbgGa3J\n4CK97o0ce4aHujMVsALZrBrhVl1BOfTSB3Ig1C297hjLKUx0QnnCjr0h8yH6\nUMUjcwJt9FhgyXkg/KCgUOd5pyW4cRTQMTBAGvjd8JYveWU8POfZbFT9zgz4\ngFCSldaqLrS03eUpWJ4YYibDr30jPzWql0i6ylm4SPAJELSVhzW39D7ZRcs4\nrD/H3wXrEQrhnHBFT2iarhLDLCrbV+sRnPn34H9m+Anlr1eGkE5D4mNv7RBs\ndRXDIHu9nML1GL/RasXaC9IgsQkASAibXMYFxh5h42SSx3bVI24v0zKmj2kY\n4TgTI+ggvqyniJkKROv5DfLpPG1yrQbqFa85PmohQ19gWjZAoZ5HRLr7tKIC\n/Y3I\r\n=4//5\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# @aofl/api-request\n\nA module for making api calls easier. Key features include caching responses and request/response formatters.\n\nCaching is implemented using @aofl/cache-manager and uses MemoryCache. @aofl/api-request caches the promises created by fetch api.\n\nRequest/response formatting referes to constructing a request payload and parsing the response payload. A formatter object should implement `pack()` and `unpack()` properties. `pack()` is to construct the request payload and `unpack()` is used to parse the response. Any number of formatters can be added to `apiRequestInstance` using the `addFromatter()` method. E.g. `GetFormatter`, `PostFormatter`, `CorsFormatter`, `FileUploadFormatter`, `GoogleMapsFormatter`, ....\n\n## Examples\n* [Basic Example](https://stackblitz.com/edit/1-0-0-api-request?embed=1)\n\n\n## Installation\n```bash\nnpm i -S @aofl/api-request\n```\n\n## Usage\n```javascript\nimport {ApiRequest} from '@aofl/api-request';\n\nclass PostFormatter {\n  static pack(payload) {\n    const headers = new Headers();\n    const body = new FormData();\n    const boundary = 'Boundary-' + Date.now();\n\n    headers.append('Accept', '*/*');\n    headers.append('Content-Type', 'multipart/form-data; boundary=' + boundary);\n\n    if (typeof payload !== 'undefined') {\n      body.append('arguments', JSON.stringify(payload));\n    }\n\n    return {\n      method: 'POST',\n      headers,\n      body,\n      mode: 'cors',\n      credentails: 'include'\n    };\n  }\n\n  static unpack(response) {\n    return response.json()\n    .then((data) => {\n      if (data.status !== 'success') {\n        return Promise.reject(data);\n      }\n      return data;\n    });\n  }\n}\n\nconst apiRequestInstance = new ApiRequest();\napiRequestInstance.addFormatter('post', PostFormatter);\n\napiRequestInstance.request('https://example.org/', {}, 'post', true, 'sample-namespace')\n.then((jsonResponse) => {\n})\n.catch((jsonResponse) => {\n});\n```\n","gitHead":"afeca11d48651d7710e6942de5fdad812d9d87f9","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"lerna/3.10.1/node@v10.13.0+x64 (darwin)","description":"A module for simplifying api calls","directories":{},"_nodeVersion":"10.13.0","dependencies":{"@aofl/cache-manager":"^2.0.0-alpha.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/api-request_2.0.0-alpha.1_1548726841213_0.16106820877336525","host":"s3://npm-registry-packages"}},"2.0.0-alpha.5":{"name":"@aofl/api-request","version":"2.0.0-alpha.5","keywords":["aofljs","@aofl/api-request","api request","api","cache response"],"author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/api-request@2.0.0-alpha.5","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"contributors":[{"name":"Daniel Belisle","email":"daniel.belisle@aofl.com"},{"name":"Micah Blu","email":"micah.blu@aofl.com"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"735bd26f554ae03676998a06c8de0b19a10077b8","tarball":"https://registry.npmjs.org/@aofl/api-request/-/api-request-2.0.0-alpha.5.tgz","fileCount":9,"integrity":"sha512-Cd6LVzsjCwSN6ilpxDRvUEYyXQOSHvlx/x63cQCyu5hEo3oI7Nu6o9vDW22SIisKDzd6ApywDjDknX2nulz0nA==","signatures":[{"sig":"MEUCIH0SLev9Fr1POlxsqG2yIQ7lffW2KyvR0H9GR+lDVSOzAiEAtYNSAMxqydfW862rmKvqxwjd6SzZsO9PmoMEy8JzNJM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":12862,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcdciUCRA9TVsSAnZWagAAx5cQAJ/udp4TjCT52U/4Hnm8\nlzrsVpyc6G3tCVlBa8BNPqEApGNrJWwgoEny8pc87BEJ246FltMO1UfzhAtN\nQKDzIP9KIBtZtmhIUcwIIDflpJyNBw3nTLdY/dBEdTqTnpgvvch9wxldJ6/3\nEzJ+aJvvGReOp5hszqXyG8d4ugNVKFHH3fZs7KQoCzEqv7ZfCB7Z0VeUNGGu\n5BT7w18Mgad5HRgaLgqG+U6PtQrDwhE3siaT3/nhboIxW4k8PrpEtUpsxNs1\n6Cr5hCSh2JOcELKimHLskbCT2ot0U2niPWSty+y23AKp5icWCH+nCqx9vojk\ntTpSoYBm1M6M7KT3daqESVyXgnDjJGqoIZrThgIrNRXw+N5pp9eK67r8aM36\nFAMWBeNd9HSxMg2gf5em+bTnczA7Lln5FM/SQoEkbzwf+dqk8eRvPRFQ5Hr3\nBY6Sq8R6BpS/aAk0fUHzXbn6ElNLIdDUGnknSTVuQVDlDKf7lXRvU0Uz7B2p\nJKxnIOvF6uqAeiEZeXpNgPDZ9MU4wxeQfXm9BzE550LYPXV7oWU5PoleW0tb\nDQkVH/dsqrJLe+bwchZBAWKLw9o7BqSlem/LTte5304QcxbHJIJQIXg6XRC3\nAw6OdB96dOL1zWdx5q/l32fQ4uESB5rkaXDL56pXmVRrL+jXQ8piMO1Zr8g/\nTOIf\r\n=7R2t\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# @aofl/api-request\n\nA module for making api calls easier. Key features include caching responses and request/response formatters.\n\nCaching is implemented using @aofl/cache-manager and uses MemoryCache. @aofl/api-request caches the promises created by fetch api.\n\nRequest/response formatting referes to constructing a request payload and parsing the response payload. A formatter object should implement `pack()` and `unpack()` properties. `pack()` is to construct the request payload and `unpack()` is used to parse the response. Any number of formatters can be added to `apiRequestInstance` using the `addFromatter()` method. E.g. `GetFormatter`, `PostFormatter`, `CorsFormatter`, `FileUploadFormatter`, `GoogleMapsFormatter`, ....\n\n## Examples\n* [Basic Example](https://stackblitz.com/edit/1-0-0-api-request?embed=1)\n\n\n## Installation\n```bash\nnpm i -S @aofl/api-request\n```\n\n## Usage\n```javascript\nimport {ApiRequest} from '@aofl/api-request';\n\nclass PostFormatter {\n  static pack(payload) {\n    const headers = new Headers();\n    const body = new FormData();\n    const boundary = 'Boundary-' + Date.now();\n\n    headers.append('Accept', '*/*');\n    headers.append('Content-Type', 'multipart/form-data; boundary=' + boundary);\n\n    if (typeof payload !== 'undefined') {\n      body.append('arguments', JSON.stringify(payload));\n    }\n\n    return {\n      method: 'POST',\n      headers,\n      body,\n      mode: 'cors',\n      credentails: 'include'\n    };\n  }\n\n  static unpack(response) {\n    return response.json()\n    .then((data) => {\n      if (data.status !== 'success') {\n        return Promise.reject(data);\n      }\n      return data;\n    });\n  }\n}\n\nconst apiRequestInstance = new ApiRequest();\napiRequestInstance.addFormatter('post', PostFormatter);\n\napiRequestInstance.request('https://example.org/', {}, 'post', true, 'sample-namespace')\n.then((jsonResponse) => {\n})\n.catch((jsonResponse) => {\n});\n```\n","gitHead":"00d91514e0c953e8cd998150ed5705b87db20b39","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"lerna/3.10.7/node@v10.13.0+x64 (darwin)","description":"A module for simplifying api calls","directories":{},"_nodeVersion":"10.13.0","dependencies":{"@aofl/cache-manager":"^2.0.0-alpha.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/api-request_2.0.0-alpha.5_1551222931328_0.15541327288834306","host":"s3://npm-registry-packages"}},"2.0.0-alpha.16":{"name":"@aofl/api-request","version":"2.0.0-alpha.16","keywords":["aofljs","@aofl/api-request","api request","api","cache response"],"author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/api-request@2.0.0-alpha.16","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"contributors":[{"name":"Daniel Belisle","email":"daniel.belisle@aofl.com"},{"name":"Micah Blu","email":"micah.blu@aofl.com"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"d3a62d77fdb633245ff9f7a0567b712837aff5f8","tarball":"https://registry.npmjs.org/@aofl/api-request/-/api-request-2.0.0-alpha.16.tgz","fileCount":11096,"integrity":"sha512-QtOvoV44ZIrJV8M7u60HJaK1Jg4glwrvIBh4iwYBJSbwChf+0mXPgBeA736F/WbyCQLNpDuyuRanLupHV8nj0Q==","signatures":[{"sig":"MEUCIQDnYsYwGJFpMpNHho04yeivsssznxl5UDVLDVAkmEX9XQIgb5112g/rMu6jFYYpjz0jr3a8xZYsi8NakzJ+Jk62tFk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":48923139,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcwhFBCRA9TVsSAnZWagAA1RIQAIa5lFbxPHklmuhYHeUx\n1wBILBx7TBS87i/+hxK9ZyWcSoi3IcuJJlwx6fXoe7EJN/KrwN0p6Da8M877\nAa46I/AAnd+9yPrlrq0cvuzkX+nW2fnWAMjeB9VAPfnu+G1b3napU3kFvu5b\noKMDBDQDjUjr/z2KoQhZXLLRvoCbItMJF3/bIkd0zGHDKGDys2pbi2kFg6Y1\nr+r356K9LATISq/uKJ6LrRwAKcJlgqTCoFbzMkB7lbvUiFEIeWiuyUsQ+3kM\nP0HvDTPiRVfyr15pmpUaSmupq8Ua8XFfRld62sPGzUNrtjHU9s878mtVsa7U\nXrqejXkDxvyrAf2oW6W8t6oYAXL0d2+C1/IC0PMVqXZ4dUEuwr8Jf8pSbEU8\nWtYI96mCBNZFn1go/txBcJESvL1IvltCEIn2O9cPIx2O1coheKafR0ZzUd1e\nUqbfAm80ZCgfisrQMBfHc3fUlvYlZRHtdxTLfG+dTn2RzZSY+VFeTHOPzGya\ne4d+5ucoyv6Na39mAwxvdjLLeoV72dIqEpuMBqvFGwB7b+thNI0IGf9+3gbW\nfVeCUYq1LySTNDTBxS9gZ32p2p3o5OF0L6Xla5u2YFfd6K2kw/lwTZNxCYaI\ns/i7oNziFyeIBWI4W81IArmY95mLKYTxdhAo7uRa20AoOs1XSVNlhTp+HTEf\nrrx8\r\n=WrLF\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# @aofl/api-request\n\nA module for making api calls easier. Key features include caching responses and request/response formatters.\n\nCaching is implemented using @aofl/cache-manager and uses MemoryCache. @aofl/api-request caches the promises created by fetch api.\n\nRequest/response formatting referes to constructing a request payload and parsing the response payload. A formatter object should implement `pack()` and `unpack()` properties. `pack()` is to construct the request payload and `unpack()` is used to parse the response. Any number of formatters can be added to `apiRequestInstance` using the `addFromatter()` method. E.g. `GetFormatter`, `PostFormatter`, `CorsFormatter`, `FileUploadFormatter`, `GoogleMapsFormatter`, ....\n\n## Examples\n* [Basic Example](https://codesandbox.io/s/github/AgeOfLearning/aofl/tree/master/aofl-js-packages/api-request/examples/simple)\n\n\n## Installation\n```bash\nnpm i -S @aofl/api-request\n```\n\n## Usage\n```javascript\nimport {ApiRequest} from '@aofl/api-request';\n\nclass PostFormatter {\n  static pack(payload) {\n    const headers = new Headers();\n    const body = new FormData();\n    const boundary = 'Boundary-' + Date.now();\n\n    headers.append('Accept', '*/*');\n    headers.append('Content-Type', 'multipart/form-data; boundary=' + boundary);\n\n    if (typeof payload !== 'undefined') {\n      body.append('arguments', JSON.stringify(payload));\n    }\n\n    return {\n      method: 'POST',\n      headers,\n      body,\n      mode: 'cors',\n      credentails: 'include'\n    };\n  }\n\n  static unpack(response) {\n    return response.json()\n    .then((data) => {\n      if (data.status !== 'success') {\n        return Promise.reject(data);\n      }\n      return data;\n    });\n  }\n}\n\nconst apiRequestInstance = new ApiRequest();\napiRequestInstance.addFormatter('post', PostFormatter);\n\napiRequestInstance.request('https://example.org/', {}, 'post', true, 'sample-namespace')\n.then((jsonResponse) => {\n})\n.catch((jsonResponse) => {\n});\n```\n","gitHead":"0b6aa717a40d408713b5b981754243de8a8aeb55","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"lerna/3.10.7/node@v10.13.0+x64 (darwin)","description":"A module for simplifying api calls","directories":{},"_nodeVersion":"10.13.0","dependencies":{"@aofl/cache-manager":"^2.0.0-alpha.16"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/api-request_2.0.0-alpha.16_1556222272111_0.7299719233580231","host":"s3://npm-registry-packages"}},"2.0.0-alpha.17":{"name":"@aofl/api-request","version":"2.0.0-alpha.17","keywords":["aofljs","@aofl/api-request","api request","api","cache response"],"author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/api-request@2.0.0-alpha.17","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"contributors":[{"name":"Daniel Belisle","email":"daniel.belisle@aofl.com"},{"name":"Micah Blu","email":"micah.blu@aofl.com"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"83c03add57372d6fead317e8f49a10483a39cee5","tarball":"https://registry.npmjs.org/@aofl/api-request/-/api-request-2.0.0-alpha.17.tgz","fileCount":9,"integrity":"sha512-kmI+W05VquOTXKEVjopwJwGg7qD9Gp1HmCMCHaE3EbVWS32a4a6Wdanx/+itOH5ce2+n4SfdbX+pZ4TsTnYQ2g==","signatures":[{"sig":"MEYCIQCWE+zZaC+oKKXsZv8BJIk5Dpang+1jI1eFZ3SG+rUgYwIhALODSyO3pVPeclBu6zV38PoIeUbrA29DDu659o8ZbkkX","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":12934,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcw0+SCRA9TVsSAnZWagAA8lAP/R49a3puSXcXR5W0rhNP\n21PN5pzFwQw2d4YD2FzSCPgJJeWut3D1wXkU0My+geGdbWiWbmteyDMygyXH\nJcDR3k+En/5QS31HMY65nDYBUIzsQ8Pg98PrzluuYpV/Mi8GpG9NDr5jkird\nWctVBxkTIzxYQklP5EsWh1y2NUENR2yTVbJHxptvm5HwFCPUFvnZOgfsj4Fn\nsKDT9UONRYsvDe8W1tP8MtQkuPfTMsm2m6xdMXfW5+ZJnxKy5uIci6LB6vBL\nVszirvPG1MUhjXciNT1bldM15HK6zddRmaIqqgmiwSWrZq7LPsKXKaEa96no\nXEtv81BCTbftVPhUn5g9zNMpEEWrWKDMMjPewl/rlrdiwyQqZqRSfhTxnsId\n0hdz89XEzbPzVBhU2zxC8b0WneOGnYA5c8Zo58wV88RHhnhvjVYHf/WXRYuC\nkwFemAJjlsv5SbGItDrLOsySD/3n9XyNAzeVcXR+CoF1Vbj0zI38YxsJ+LQx\nw+e+Va6r1WnUdMoXp9QUbFCtL2pCS5Q1XSvghaFLYd0cb9NGOSOpAe4EpzL6\nN9Bn6v6alViy1Qtd8I0jaqnnqr1t2J/GkMtyOFEJEpMQ2mpb+Jf0QBxpBghY\nttY7YDpTIcLs4yXaNgGNUQ0NZ8XO4Kk5/N+Tsk4B9ZVlz19LOPmE5nB+uELF\nUSt6\r\n=BeIR\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# @aofl/api-request\n\nA module for making api calls easier. Key features include caching responses and request/response formatters.\n\nCaching is implemented using @aofl/cache-manager and uses MemoryCache. @aofl/api-request caches the promises created by fetch api.\n\nRequest/response formatting referes to constructing a request payload and parsing the response payload. A formatter object should implement `pack()` and `unpack()` properties. `pack()` is to construct the request payload and `unpack()` is used to parse the response. Any number of formatters can be added to `apiRequestInstance` using the `addFromatter()` method. E.g. `GetFormatter`, `PostFormatter`, `CorsFormatter`, `FileUploadFormatter`, `GoogleMapsFormatter`, ....\n\n## Examples\n* [Basic Example](https://codesandbox.io/s/github/AgeOfLearning/aofl/tree/master/aofl-js-packages/api-request/examples/simple)\n\n\n## Installation\n```bash\nnpm i -S @aofl/api-request\n```\n\n## Usage\n```javascript\nimport {ApiRequest} from '@aofl/api-request';\n\nclass PostFormatter {\n  static pack(payload) {\n    const headers = new Headers();\n    const body = new FormData();\n    const boundary = 'Boundary-' + Date.now();\n\n    headers.append('Accept', '*/*');\n    headers.append('Content-Type', 'multipart/form-data; boundary=' + boundary);\n\n    if (typeof payload !== 'undefined') {\n      body.append('arguments', JSON.stringify(payload));\n    }\n\n    return {\n      method: 'POST',\n      headers,\n      body,\n      mode: 'cors',\n      credentails: 'include'\n    };\n  }\n\n  static unpack(response) {\n    return response.json()\n    .then((data) => {\n      if (data.status !== 'success') {\n        return Promise.reject(data);\n      }\n      return data;\n    });\n  }\n}\n\nconst apiRequestInstance = new ApiRequest();\napiRequestInstance.addFormatter('post', PostFormatter);\n\napiRequestInstance.request('https://example.org/', {}, 'post', true, 'sample-namespace')\n.then((jsonResponse) => {\n})\n.catch((jsonResponse) => {\n});\n```\n","gitHead":"6a396437dcb380ba2269ac50a5b3b88e54f99027","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"lerna/3.10.7/node@v10.13.0+x64 (darwin)","description":"A module for simplifying api calls","directories":{},"_nodeVersion":"10.13.0","dependencies":{"@aofl/cache-manager":"^2.0.0-alpha.17"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/api-request_2.0.0-alpha.17_1556303762118_0.29779744318543044","host":"s3://npm-registry-packages"}},"2.0.0":{"name":"@aofl/api-request","version":"2.0.0","keywords":["aofljs","@aofl/api-request","api request","api","cache response"],"author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/api-request@2.0.0","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"contributors":[{"name":"Daniel Belisle","email":"daniel.belisle@aofl.com"},{"name":"Micah Blu","email":"micah.blu@aofl.com"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"834ee0051def81a3eecc45e977283e068f0508c2","tarball":"https://registry.npmjs.org/@aofl/api-request/-/api-request-2.0.0.tgz","fileCount":9,"integrity":"sha512-TSmNK3bzbEyxF3v507UKiYciIja7HhGcpevzqlvLq74W1xxFPnzKSlWDnzl+at3Ezc+coVrdxaRB9u4tRfetHg==","signatures":[{"sig":"MEUCIGa7hbkocrcpzyxDf0tXGfeDk14rk0jdDprrdNI/HQM5AiEAz7jMSSzZgJiPK33XjNOCw9kHu1KqSMsGhnrK7arA7kY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":12916,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcyKKuCRA9TVsSAnZWagAAg2AP+gMFX3o24S9XgzkqJ4q3\nFEAThCUm2Q4YspWDs7uIYY7HGHRDgyWkCcEyqNFdu+qMfHcsc47Zbqw4S4oU\nY7Bid3siJHRyRe0fB9ZeoLK+X2e0vpwmXjPTps3bFMYj1i6AR/VCLCzrvXRm\nzBCWFmeA9IG0qSGTdosGd7trAAWqxtsGFXy5nbCxUMjJ9dQuGsju/5REHnE1\nnCumUIACFRpvWVz4XvnMaBdl3whedVmwTMRPWF6HnAkWUIvbWZ6Yoj4+i0ya\nIJrRn7sVjWU7zr9ou4CJb4BK01zI/PW5w11X1LOUIw+LYqLNxOkAVwVQTdVh\nvmbPK9XsMxJRg+n+pp9bkJdas40Oj2Drv0Nx/4eEyw2LKlsFGewluskAFxcJ\n3GVkLXizzANfchqZYJfbhRP9CzHpdEZ0Ej8QNjo8/fbu/raZri+OC3GTUwQN\n5he69qA46xGHSkV7MUPK0E8xxtmLk4HEKZJBLqHB9Kz+npzUXjI22ussCKuS\nqmpMNwkxHDhoalxqctAgm+WwFxiNCPLmeAkfZIim2Wkjg9yyNZdt7Cly/j5P\n1WTuxIYG/H0L3dAT6ZjRfZWRoYb81PsY/3nz7ejjEmtTAarNomWjsXjSpATr\nOBwcJGrhQM3VnuZkyi+wwLRv2Ta0Dbsa2/LenRZ+Eg+C4CMsgl6v2BCsB9T6\nNA1J\r\n=qDiF\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"91b9b3074f7031a51ce7afa9b542ff5dcfd64997","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"lerna/3.10.7/node@v10.13.0+x64 (darwin)","description":"A module for simplifying api calls","directories":{},"_nodeVersion":"10.13.0","dependencies":{"@aofl/cache-manager":"^2.0.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/api-request_2.0.0_1556652716658_0.019874164977702558","host":"s3://npm-registry-packages"}},"3.0.0-0":{"name":"@aofl/api-request","version":"3.0.0-0","keywords":["aofljs","@aofl/api-request","api request","api","cache response"],"author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/api-request@3.0.0-0","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"contributors":[{"name":"Daniel Belisle","email":"daniel.belisle@aofl.com"},{"name":"Micah Blu","email":"micah.blu@aofl.com"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"e4a8f0577b643a40b9de892b129a182cd1e10dbf","tarball":"https://registry.npmjs.org/@aofl/api-request/-/api-request-3.0.0-0.tgz","fileCount":9,"integrity":"sha512-YDLV7b3xlFCXc/w9TYDlTK0k/kyptrLCd5dMgO+iMCUaB+3mhzp7194suw3mZOO+OwEGDn17yj0E0EYgvlim9g==","signatures":[{"sig":"MEUCIQDqP65B6F/LSDT7YJZ0tyZbSb/v1Y8ue/oJAHp8VMI2RAIgOMmJJRA6TDUX/kqvU49ioMB9NO8FyP0y1U52vKpO93s=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":12920,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdgG1/CRA9TVsSAnZWagAAnvAP/jGcmKmqv02Mkk1tH/H9\nfcXU46szysId92yjY2EFQ62HmaFpPcRnTpW+3lMLX1Vhdoyntgvg+nnTQIC4\nlsjic2a2HC2+2vvrFH7djoTQP9IG4T0BQAn5h1RB+IxZwsBQf1MuFnomb4AV\neJfqtV6rYVNNr2l9x6ms7RAJV9UG1/QHJQH1e2HL4xy9f2k9p1lCaeyFKCMe\nYXzGtPDb494yyF5P6nYAeHLoJcmSOgYRiqEixxMZUNuw1/ulsADKrAdpNsTV\nnlpCdVhnHJTN4d9VH8Aylx5mgambAH2dTPoFs8n3JNmlcFawUKjaqUoBcvqO\nUOJRCglATmCoWyJEc/iD6WSvn1qidfLQsJ4yC0uH1tmoc2mIury0vT4vB5yK\nOIKdsjjMlLeGijU8A6ScKJ21LqmAvepNt0QmGRiRkbxmNPPQfpmmjzqLlw7c\nkJUTiq4zah0577aXareXzlMEyPyM0c0Ak6Gby317vThgaQ4ZhmN96flnkpE7\nT+g30f5v1uZaaqruvmHZ8JdrxcHXHAiCyIYt1QY5d7qCisx5wcgwVkyhcLoo\nVpb7EnfknDykpU/F5CE2sg8aqbyMD5QCaD+7YkO8brmbEPU0xlV/MVlPDhGm\nIeF9WdNNkGlDQaF3sxbC4u+Ot3Ra2+dY7CDyzC4jRqWWvFnabcjvmnuY6GGe\nmIrs\r\n=okxC\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# @aofl/api-request\n\nA module for making api calls easier. Key features include caching responses and request/response formatters.\n\nCaching is implemented using @aofl/cache-manager and uses MemoryCache. @aofl/api-request caches the promises created by fetch api.\n\nRequest/response formatting referes to constructing a request payload and parsing the response payload. A formatter object should implement `pack()` and `unpack()` properties. `pack()` is to construct the request payload and `unpack()` is used to parse the response. Any number of formatters can be added to `apiRequestInstance` using the `addFromatter()` method. E.g. `GetFormatter`, `PostFormatter`, `CorsFormatter`, `FileUploadFormatter`, `GoogleMapsFormatter`, ....\n\n## Examples\n* [Basic Example](https://codesandbox.io/s/github/AgeOfLearning/aofl/tree/master/aofl-js-packages/api-request/examples/simple)\n\n\n## Installation\n```bash\nnpm i -S @aofl/api-request\n```\n\n## Usage\n```javascript\nimport {ApiRequest} from '@aofl/api-request';\n\nclass PostFormatter {\n  static pack(payload) {\n    const headers = new Headers();\n    const body = new FormData();\n    const boundary = 'Boundary-' + Date.now();\n\n    headers.append('Accept', '*/*');\n    headers.append('Content-Type', 'multipart/form-data; boundary=' + boundary);\n\n    if (typeof payload !== 'undefined') {\n      body.append('arguments', JSON.stringify(payload));\n    }\n\n    return {\n      method: 'POST',\n      headers,\n      body,\n      mode: 'cors',\n      credentails: 'include'\n    };\n  }\n\n  static unpack(response) {\n    return response.json()\n    .then((data) => {\n      if (data.status !== 'success') {\n        return Promise.reject(data);\n      }\n      return data;\n    });\n  }\n}\n\nconst apiRequestInstance = new ApiRequest();\napiRequestInstance.addFormatter('post', PostFormatter);\n\napiRequestInstance.request('https://example.org/', {}, 'post', true, 'sample-namespace')\n.then((jsonResponse) => {\n})\n.catch((jsonResponse) => {\n});\n```\n","gitHead":"68ed707a605f1a3cb02ab70ff9ed8a188867028c","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"lerna/3.16.4/node@v10.15.3+x64 (darwin)","description":"A module for simplifying api calls","directories":{},"_nodeVersion":"10.15.3","dependencies":{"@aofl/cache-manager":"^3.0.0-0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/api-request_3.0.0-0_1568697727024_0.05093474522064767","host":"s3://npm-registry-packages"}},"3.0.0-alpha.0":{"name":"@aofl/api-request","version":"3.0.0-alpha.0","keywords":["aofljs","@aofl/api-request","api request","api","cache response"],"author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/api-request@3.0.0-alpha.0","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"contributors":[{"name":"Daniel Belisle","email":"daniel.belisle@aofl.com"},{"name":"Micah Blu","email":"micah.blu@aofl.com"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"da50396303b51be73d0ab0e4396a14b00cb4c708","tarball":"https://registry.npmjs.org/@aofl/api-request/-/api-request-3.0.0-alpha.0.tgz","fileCount":9,"integrity":"sha512-4aZhs2szkz3Ha29unat1orjDL94bfKZ1VpJqJMPmvhGB/89GVugBkA5Pt9txEiILqguk0Scsl/3g//oNQ+doWw==","signatures":[{"sig":"MEQCIAT8gv2Sy4ftV3OR4BmeL6SHRJjQm6C01r6RGGJcQiRAAiB4Vc7vBoXutivAV3l4wTu/FwwcZXjF8IcrGq3/VYpmfA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":12932,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdgG31CRA9TVsSAnZWagAA1NQP/RkUoo5shSJcwSRqkMhN\n/UrqqBS1htqL+G0WuZR5TPjpLeV9ocFvIuXDsdN6bKCX5X9zJOotfcfkdKkZ\nBGBn9LashhNga5smcVXIt/UnxcDgiM3hkZpikNlwJYaZZ1now6zXgGoW2f/J\nZX+TQE8QsHoz5fnkko+ZdcaPR5wnpJd0Q7e0ggEvFi9GJusiakKE1oT+Jfuc\n9zrSLWaj7idYVgbyaJmrz+DuVuECCfF5mr+8pqG9fLuVJx4KYR+KRUH24uZi\n8Yi59O7iyQ9eXjPlYPLNX/gA4cldDhxQYqYnMgus2H9MkKHFpgZI9WC7oKm8\nRwIMiKTilO8I4AUdhfsG1m3CYpfKE+WzfRarL0qZNhPe0YGFpYDUY++XilwI\nXcDM7wSBSYK25ehUWhDkzUhFIgnGXXYn4Clz6bqPqNorFUGmhlDXzhVGJ12j\nsVdvcZ5dlqXBqZioL7YuwPQnJctoPDEowfbgXn+LW/iuLikSFtaDrBpd1LFu\niqCvrivb8LIgNki/1n/42RQoADxD0YfPOMH6dvlqD6eu5vS80RhrBihnWXWf\n5lq4N442pZMaWPeo+/NKkSA0+SU41U6kZ2yH5PAdfDMpvnfW1a2Ek/QRbHuc\nQsk1dAUoqdj/TQ2f+rMZJhaxXMtmZOH48iPBYQTJL4oybN+8MvfUHux1tkdJ\nBGwZ\r\n=ZiFk\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# @aofl/api-request\n\nA module for making api calls easier. Key features include caching responses and request/response formatters.\n\nCaching is implemented using @aofl/cache-manager and uses MemoryCache. @aofl/api-request caches the promises created by fetch api.\n\nRequest/response formatting referes to constructing a request payload and parsing the response payload. A formatter object should implement `pack()` and `unpack()` properties. `pack()` is to construct the request payload and `unpack()` is used to parse the response. Any number of formatters can be added to `apiRequestInstance` using the `addFromatter()` method. E.g. `GetFormatter`, `PostFormatter`, `CorsFormatter`, `FileUploadFormatter`, `GoogleMapsFormatter`, ....\n\n## Examples\n* [Basic Example](https://codesandbox.io/s/github/AgeOfLearning/aofl/tree/master/aofl-js-packages/api-request/examples/simple)\n\n\n## Installation\n```bash\nnpm i -S @aofl/api-request\n```\n\n## Usage\n```javascript\nimport {ApiRequest} from '@aofl/api-request';\n\nclass PostFormatter {\n  static pack(payload) {\n    const headers = new Headers();\n    const body = new FormData();\n    const boundary = 'Boundary-' + Date.now();\n\n    headers.append('Accept', '*/*');\n    headers.append('Content-Type', 'multipart/form-data; boundary=' + boundary);\n\n    if (typeof payload !== 'undefined') {\n      body.append('arguments', JSON.stringify(payload));\n    }\n\n    return {\n      method: 'POST',\n      headers,\n      body,\n      mode: 'cors',\n      credentails: 'include'\n    };\n  }\n\n  static unpack(response) {\n    return response.json()\n    .then((data) => {\n      if (data.status !== 'success') {\n        return Promise.reject(data);\n      }\n      return data;\n    });\n  }\n}\n\nconst apiRequestInstance = new ApiRequest();\napiRequestInstance.addFormatter('post', PostFormatter);\n\napiRequestInstance.request('https://example.org/', {}, 'post', true, 'sample-namespace')\n.then((jsonResponse) => {\n})\n.catch((jsonResponse) => {\n});\n```\n","gitHead":"c6c4d16f33cbd321585e3e7c86b1aaaeeccd3627","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"lerna/3.16.4/node@v10.15.3+x64 (darwin)","description":"A module for simplifying api calls","directories":{},"_nodeVersion":"10.15.3","dependencies":{"@aofl/cache-manager":"^3.0.0-alpha.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/api-request_3.0.0-alpha.0_1568697845273_0.6027458681647755","host":"s3://npm-registry-packages"}},"3.0.0-alpha.5":{"name":"@aofl/api-request","version":"3.0.0-alpha.5","keywords":["aofljs","@aofl/api-request","api request","api","cache response"],"author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/api-request@3.0.0-alpha.5","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"contributors":[{"name":"Daniel Belisle","email":"daniel.belisle@aofl.com"},{"name":"Micah Blu","email":"micah.blu@aofl.com"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"ae6ab143decd30d73a164b3e5307eaee7416f05a","tarball":"https://registry.npmjs.org/@aofl/api-request/-/api-request-3.0.0-alpha.5.tgz","fileCount":9,"integrity":"sha512-6TOvV7zfrCVnbijtZTIWCyY6tVigejOei0E9HIoRGpdRqi/lOt1AAXVwLBYwLPkzjcigJqh+pn2NXvxdFeBg6Q==","signatures":[{"sig":"MEQCIGDbQNi3PnFbrTBMuRgSrTu+8phlNu60rRXpolTapwwRAiAeffUIpfEh+5a0Z5rOPNdxeuOEI5HIaSu4Ps9iuqcQvQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":12932,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdhHKMCRA9TVsSAnZWagAAhdAP/RU9lg1C7zCJPlPubJIz\nr/yyvvdyIOx6y5eh6Fld8JJzKmnES93MKVm/fXvEO1vezRB7jpXqlwlPuSHb\netsTe0mqhD8yUCZV6whmB0/qHATTwRsDW6zVgtvZD7PSKWE8S6GG8DI1gCFn\n939UXfOqq3Hrz7aLYi/sqX7T+7IfXZGZ3rh0tr8rLiwIdO/INxYQvBLd9VdJ\nwFFO4a+pCOiW6IEqakfCbLRA+jMcA/VsEEu+vvGqEcKiZXurZ2kPsmZJaMXy\nnw3E2f00wLbo5ojflohzXG2MnaFOIYYsMDTijTv+/6R7DA4mqGg9/MFTexlJ\nFjZ8GPZl44liJDhdkxUGKc0ynJtIDUKyE8zgWM0EeBgY9cVx8mdCKXzDgwaT\nac5MEsPk4Kphjsih3kjphGk1IjGuAtx7UnWMm39qzTTBTQkLuOKdIVbILykR\ngRvi1O6ohAbW8LfI/qlYoN98K2LV6Wb4HzDUUwKkyTZhw4QbmxI72ORJVkCB\nWsHklxFM5DUBvSUV7ytBljn1Sz3IpBCQkHrhDtRHhLCNnfZoQC6qTSd1o9lS\ngs42Cv4SEXU9GgtkdK6PivD8mqpRq7ugf3zSt1uO44GD7aLaMDCpgVFWtjbs\n/SElz5z8YpFG/K/5vTW5wdvxJkO3m6hurs99vck8nyDWTVcYMz7QunWZMb/F\nIhtL\r\n=BK6w\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# @aofl/api-request\n\nA module for making api calls easier. Key features include caching responses and request/response formatters.\n\nCaching is implemented using @aofl/cache-manager and uses MemoryCache. @aofl/api-request caches the promises created by fetch api.\n\nRequest/response formatting referes to constructing a request payload and parsing the response payload. A formatter object should implement `pack()` and `unpack()` properties. `pack()` is to construct the request payload and `unpack()` is used to parse the response. Any number of formatters can be added to `apiRequestInstance` using the `addFromatter()` method. E.g. `GetFormatter`, `PostFormatter`, `CorsFormatter`, `FileUploadFormatter`, `GoogleMapsFormatter`, ....\n\n## Examples\n* [Basic Example](https://codesandbox.io/s/github/AgeOfLearning/aofl/tree/master/aofl-js-packages/api-request/examples/simple)\n\n\n## Installation\n```bash\nnpm i -S @aofl/api-request\n```\n\n## Usage\n```javascript\nimport {ApiRequest} from '@aofl/api-request';\n\nclass PostFormatter {\n  static pack(payload) {\n    const headers = new Headers();\n    const body = new FormData();\n    const boundary = 'Boundary-' + Date.now();\n\n    headers.append('Accept', '*/*');\n    headers.append('Content-Type', 'multipart/form-data; boundary=' + boundary);\n\n    if (typeof payload !== 'undefined') {\n      body.append('arguments', JSON.stringify(payload));\n    }\n\n    return {\n      method: 'POST',\n      headers,\n      body,\n      mode: 'cors',\n      credentails: 'include'\n    };\n  }\n\n  static unpack(response) {\n    return response.json()\n    .then((data) => {\n      if (data.status !== 'success') {\n        return Promise.reject(data);\n      }\n      return data;\n    });\n  }\n}\n\nconst apiRequestInstance = new ApiRequest();\napiRequestInstance.addFormatter('post', PostFormatter);\n\napiRequestInstance.request('https://example.org/', {}, 'post', true, 'sample-namespace')\n.then((jsonResponse) => {\n})\n.catch((jsonResponse) => {\n});\n```\n","gitHead":"09f43882b317744481f4b6845b1cfae0461775d6","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"lerna/3.16.4/node@v10.16.3+x64 (darwin)","description":"A module for simplifying api calls","directories":{},"_nodeVersion":"10.16.3","dependencies":{"@aofl/cache-manager":"^3.0.0-alpha.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/api-request_3.0.0-alpha.5_1568961163605_0.06563348285836579","host":"s3://npm-registry-packages"}},"3.0.0-alpha.9":{"name":"@aofl/api-request","version":"3.0.0-alpha.9","keywords":["aofljs","@aofl/api-request","api request","api","cache response"],"author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/api-request@3.0.0-alpha.9","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"contributors":[{"name":"Daniel Belisle","email":"daniel.belisle@aofl.com"},{"name":"Micah Blu","email":"micah.blu@aofl.com"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"273bdbde859debcba59d7d55764638ed4c4a2085","tarball":"https://registry.npmjs.org/@aofl/api-request/-/api-request-3.0.0-alpha.9.tgz","fileCount":9,"integrity":"sha512-wAK8OwUdGbMx99Jscru5K9UikodR7AUkJFevniMcN6N278ssj9Kz26+2zBcV4P0SMeSBwo3D34WK9NKBjf8T4Q==","signatures":[{"sig":"MEQCIGrxIsGFH4bji5nJv5vh+5d1ne+PKiD1nkmwXMJK5kMEAiAIZ+EuYJGPjnRyq7NHGnVdT1d2H8Gow3i4bSpTK/6SnQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":13242,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdjSZ4CRA9TVsSAnZWagAAjVkP/11lDlRd9fvGenS+Vuq9\n9UEnqvH8N4SkjIAJgCh6olH22oe68ifA6PQsDZvn+fduixD0rhzKpTqbEGFZ\n4skS2HVEto6ynumG9Xd4mWNjLUOI3wNWX5p2K5enI6Uw7sSKV7qcFsIgX7gn\nqQePKDGdnRxF86+RoGnNpIzdWW/C83VMw5bLYcEt030c1dUK+omf0SjAFtro\nqGQ+AQiCvsB12ILWrgIubd1QEwV4u4LgGVTPlNSgEUv4+H1UscdFVhgqnHmB\nVdhAZ19IAA9P9kMt6QHoXj+7QktvlliKEoynGZo0CVXeS7WPRCv4Cyt/TLsA\nq+jA7eg4x9Wfe6ttaJvctVFi0nYk2LLLe81bUszD2LMcxIQyXp9KXOS63Tmi\nJMjYUpT67cchOSl8iKTqHf1iYjU/w62mhUJzzmyfHN9PQSxH87sC5kSz4wcG\n4KpMwh6ylf8KpFJLEqX5XC6vNmA7yTR4EmR3h9wRdqcXT3qyRFU7/QPb+V30\nz+5ECt2xW0Ik0EfJmaSrWBycY3tq35ywzsSLaK1o0nvpivPl4H+I/nAunkBE\nIWDobqcUpDHWZXrDD9fIXtaxlMgN7Yd1sARH/arR39LfVM3IDtP99TaERjNH\n3RroeRLUC0z3zTRjGB1DsUqiTc3yXUBATvdBjbL5d8EpAjTGLCF4c1Tusbn9\n9QqN\r\n=TWqT\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# @aofl/api-request\n\nA module for making api calls easier. Key features include caching responses and request/response formatters.\n\nCaching is implemented using @aofl/cache-manager and uses MemoryCache. @aofl/api-request caches the promises created by fetch api.\n\nRequest/response formatting referes to constructing a request payload and parsing the response payload. A formatter object should implement `pack()` and `unpack()` properties. `pack()` is to construct the request payload and `unpack()` is used to parse the response. Any number of formatters can be added to `apiRequestInstance` using the `addFromatter()` method. E.g. `GetFormatter`, `PostFormatter`, `CorsFormatter`, `FileUploadFormatter`, `GoogleMapsFormatter`, ....\n\n## Examples\n* [Basic Example](https://codesandbox.io/s/github/AgeOfLearning/aofl/tree/master/aofl-js-packages/api-request/examples/simple)\n\n\n## Installation\n```bash\nnpm i -S @aofl/api-request\n```\n\n## Usage\n```javascript\nimport {ApiRequest} from '@aofl/api-request';\n\nclass PostFormatter {\n  static pack(payload) {\n    const headers = new Headers();\n    const body = new FormData();\n    const boundary = 'Boundary-' + Date.now();\n\n    headers.append('Accept', '*/*');\n    headers.append('Content-Type', 'multipart/form-data; boundary=' + boundary);\n\n    if (typeof payload !== 'undefined') {\n      body.append('arguments', JSON.stringify(payload));\n    }\n\n    return {\n      method: 'POST',\n      headers,\n      body,\n      mode: 'cors',\n      credentails: 'include'\n    };\n  }\n\n  static unpack(response) {\n    return response.json()\n    .then((data) => {\n      if (data.status !== 'success') {\n        return Promise.reject(data);\n      }\n      return data;\n    });\n  }\n}\n\nconst apiRequestInstance = new ApiRequest();\napiRequestInstance.addFormatter('post', PostFormatter);\n\napiRequestInstance.request('https://example.org/', {}, 'post', true, 'sample-namespace')\n.then((jsonResponse) => {\n})\n.catch((jsonResponse) => {\n});\n```\n","gitHead":"af4670fc661aeb5d8cb38bc049ed149e776972fb","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"lerna/3.10.7/node@v10.16.0+x64 (darwin)","description":"A module for simplifying api calls","directories":{},"_nodeVersion":"10.16.0","dependencies":{"@aofl/cache-manager":"^3.0.0-alpha.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/api-request_3.0.0-alpha.9_1569531511529_0.059101672321719034","host":"s3://npm-registry-packages"}},"3.0.0-alpha.11":{"name":"@aofl/api-request","version":"3.0.0-alpha.11","keywords":["aofljs","@aofl/api-request","api request","api","cache response"],"author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/api-request@3.0.0-alpha.11","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"contributors":[{"name":"Daniel Belisle","email":"daniel.belisle@aofl.com"},{"name":"Micah Blu","email":"micah.blu@aofl.com"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"fc954f671375147bfb3fb9652dcc55f52fad5a5d","tarball":"https://registry.npmjs.org/@aofl/api-request/-/api-request-3.0.0-alpha.11.tgz","fileCount":9,"integrity":"sha512-F899Hjgpx8aJb0XfPhToeTPzfh/Qc/l35D1ElrGsK7ky/eIOr7w+dJnK//hibVGYiHN2f4UUTqpZy7tcy2IGQg==","signatures":[{"sig":"MEUCIBFaZrKIb73dUlolG3iNPFd6yK7ndB/yzurKBCe0aRZ0AiEAqyM0/bORYQO8TyKyCTwRwxVzWu7KnA67YL+21M3l6+8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":13244,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdjbD+CRA9TVsSAnZWagAADEcP/1dJo/ZiATOUztCzUPyC\ncYXVgCry4gtiV5eMpmbnIJJ9nMYbql/MYs0nnD1WMZ2XzoRYLauD0/QGurvO\nv3y4xIG91mpYbW+h0dH1vw41jIVRXl3sjad68DpNFWok+E+8A0k2obnUoq78\nMaDTt/945nZo6wxXbGwu55grT/HYQhFCrMJSwBUm4cwxrH/ESBzAk18awcWN\nvWNaUEhky0I7oyl/vaXR4hY3qtHNLV4Agw81znmcHipfPYJVdqqoQ0A0tWq+\ntp99Ta/HQNpPOFZSCyAb6PE38+VVLw2NidShqLC83aoBRkAswCc+g8NdzR4V\noMRQ3mg+MuxAFmVKicCVAPvYfCsLzbWP6AU6YfdRdoC9eRoHeU9vAlasbwcT\n1eO2+AspdZU0ePTI0WSCrCpzrDJoT2kLny2A6i+ssGuLmpVlAhvFnp1D92ST\nu2RvAaRyRA5xn1l7iIsk3uyBMHPT+47TZxfxg9jZCqwbQAnyvbqMAJN6yPAw\n2KTHYi3Afal6GztL4rma/EzQTaG7apsk1YF0Guqih1YWbG2nzT0GmyMevSBO\nT2qnPLUYbwc9sYy303v93j5h/It4QbpOLsA7M6aXKwrbJW3WiKAnungIfw6N\n/1p1fPTgfq03V81Wje3y2n0Rr9LrhAGtPhuhiqdzG0jL5nFXNq+fAESDgoeO\nm20w\r\n=bSsu\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# @aofl/api-request\n\nA module for making api calls easier. Key features include caching responses and request/response formatters.\n\nCaching is implemented using @aofl/cache-manager and uses MemoryCache. @aofl/api-request caches the promises created by fetch api.\n\nRequest/response formatting referes to constructing a request payload and parsing the response payload. A formatter object should implement `pack()` and `unpack()` properties. `pack()` is to construct the request payload and `unpack()` is used to parse the response. Any number of formatters can be added to `apiRequestInstance` using the `addFromatter()` method. E.g. `GetFormatter`, `PostFormatter`, `CorsFormatter`, `FileUploadFormatter`, `GoogleMapsFormatter`, ....\n\n## Examples\n* [Basic Example](https://codesandbox.io/s/github/AgeOfLearning/aofl/tree/master/aofl-js-packages/api-request/examples/simple)\n\n\n## Installation\n```bash\nnpm i -S @aofl/api-request\n```\n\n## Usage\n```javascript\nimport {ApiRequest} from '@aofl/api-request';\n\nclass PostFormatter {\n  static pack(payload) {\n    const headers = new Headers();\n    const body = new FormData();\n    const boundary = 'Boundary-' + Date.now();\n\n    headers.append('Accept', '*/*');\n    headers.append('Content-Type', 'multipart/form-data; boundary=' + boundary);\n\n    if (typeof payload !== 'undefined') {\n      body.append('arguments', JSON.stringify(payload));\n    }\n\n    return {\n      method: 'POST',\n      headers,\n      body,\n      mode: 'cors',\n      credentails: 'include'\n    };\n  }\n\n  static unpack(response) {\n    return response.json()\n    .then((data) => {\n      if (data.status !== 'success') {\n        return Promise.reject(data);\n      }\n      return data;\n    });\n  }\n}\n\nconst apiRequestInstance = new ApiRequest();\napiRequestInstance.addFormatter('post', PostFormatter);\n\napiRequestInstance.request('https://example.org/', {}, 'post', true, 'sample-namespace')\n.then((jsonResponse) => {\n})\n.catch((jsonResponse) => {\n});\n```\n","gitHead":"ecdfe7e68c95cd3ce9eca2c86626275d1d4559fe","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"lerna/3.16.4/node@v10.16.3+x64 (darwin)","description":"A module for simplifying api calls","directories":{},"_nodeVersion":"10.16.3","dependencies":{"@aofl/cache-manager":"^3.0.0-alpha.11"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/api-request_3.0.0-alpha.11_1569566973594_0.668007085646009","host":"s3://npm-registry-packages"}},"3.0.0-beta.5":{"name":"@aofl/api-request","version":"3.0.0-beta.5","keywords":["aofljs","@aofl/api-request","api request","api","cache response"],"author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/api-request@3.0.0-beta.5","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"contributors":[{"name":"Daniel Belisle","email":"daniel.belisle@aofl.com"},{"name":"Micah Blu","email":"micah.blu@aofl.com"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"dcc68dabe72762b83b6d655698c3103c3e89318d","tarball":"https://registry.npmjs.org/@aofl/api-request/-/api-request-3.0.0-beta.5.tgz","fileCount":9,"integrity":"sha512-SZiAwF2bip+j7gcAXuhQf0Ekg00w3CgdTimoUJG7PKvrKH97/OTFRT7Z8b9waBcPGKdKQ9wV2LmhKjb4/7WhYA==","signatures":[{"sig":"MEYCIQC0yHpsSkFxBNSMUAdzGpX6O6UnntAXsWEPaqr+vqzv6QIhAJD1PCIdGktbKb21sd3wztjV4TykaSixOULEe0x3MmjV","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":14003,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdmbxZCRA9TVsSAnZWagAAeLQP/3F+9ztC1QdHzNeV3bG4\nfWPUlfPHyvIGhMbCO/375yxOwrjeHJzL3QTWR0fqfzVvl5vDuDYaVYUmcedl\nQsSApiKKUPOv2Yj+uIniQwLCl+7HYdPhXSNuGMx/KnQsxJYY3xjCvmXKN1bw\njgIXutKV7mpWTQhPmE4vCILiRjglzTn7ku0xZPSsK+VfSX11VnZnupVh7llp\nQtUbKnLWJyFPQfMg68vDImIqEol9pRB75yCB/U5mkLz5EzxvUNO4Z2s6L3Lb\nedzZjhhFfCNBfP/rCUqB2XCgSQrunkoKSHTp7TG8v6nA0/d04uyqMnfkQjmk\nLVhEcVJwXD+tashpFBr0pnZ+KEuhcbrgc29VpUk9ODRGwKvCIsnj+MqAKoN0\ni4+IkiqZ0FfR6X/t8sRdcrvn9dwJMomm7FA8UVj0PAwukJGckKb1xICMQFeU\nvy7uLj/sm1PRpkNoXAgHAcE98CayxQ+PjnRbplppDpy90dsNqoZx/PStftzK\nZ0g7ts2csd2KFBC8DSu6R21+oODOt/khQ3U+wcmYDZY1BMz7cPEZqWN3cSyE\nxW7y7Kx6EQ23OLGD6o6zUV4IllW1Rwx4YaSeQ7qu/Wqnm5cqAo2CzbKZ0AuZ\n2scGzjjVlVK/E0TCktke3DaEkXuVng9lciGBLa9EiPpidFuyq3sZGhwIkmwn\nCnpL\r\n=BpZs\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# @aofl/api-request\n\nA module for making api calls easier. Key features include caching responses and request/response formatters.\n\nCaching is implemented using @aofl/cache-manager and uses MemoryCache. @aofl/api-request caches the promises created by fetch api.\n\nRequest/response formatting referes to constructing a request payload and parsing the response payload. A formatter object should implement `pack()` and `unpack()` properties. `pack()` is to construct the request payload and `unpack()` is used to parse the response. Any number of formatters can be added to `apiRequestInstance` using the `addFromatter()` method. E.g. `GetFormatter`, `PostFormatter`, `CorsFormatter`, `FileUploadFormatter`, `GoogleMapsFormatter`, ....\n\n## Examples\n* [Basic Example](https://codesandbox.io/s/github/AgeOfLearning/aofl/tree/master/aofl-js-packages/api-request/examples/simple)\n\n\n## Installation\n```bash\nnpm i -S @aofl/api-request\n```\n\n## Usage\n```javascript\nimport {ApiRequest} from '@aofl/api-request';\n\nclass PostFormatter {\n  static pack(payload) {\n    const headers = new Headers();\n    const body = new FormData();\n    const boundary = 'Boundary-' + Date.now();\n\n    headers.append('Accept', '*/*');\n    headers.append('Content-Type', 'multipart/form-data; boundary=' + boundary);\n\n    if (typeof payload !== 'undefined') {\n      body.append('arguments', JSON.stringify(payload));\n    }\n\n    return {\n      method: 'POST',\n      headers,\n      body,\n      mode: 'cors',\n      credentails: 'include'\n    };\n  }\n\n  static unpack(response) {\n    return response.json()\n    .then((data) => {\n      if (data.status !== 'success') {\n        return Promise.reject(data);\n      }\n      return data;\n    });\n  }\n}\n\nconst apiRequestInstance = new ApiRequest();\napiRequestInstance.addFormatter('post', PostFormatter);\n\napiRequestInstance.request('https://example.org/', {}, 'post', true, 'sample-namespace')\n.then((jsonResponse) => {\n})\n.catch((jsonResponse) => {\n});\n```\n","gitHead":"6eab96d111f1ebe9e5c5cff00cf108d46ac4ee19","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"lerna/3.16.4/node@v10.16.3+x64 (darwin)","description":"A module for simplifying api calls","directories":{},"_nodeVersion":"10.16.3","dependencies":{"@aofl/cache-manager":"^3.0.0-beta.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/api-request_3.0.0-beta.5_1570356313215_0.5924782141717941","host":"s3://npm-registry-packages"}},"3.0.0-beta.6":{"name":"@aofl/api-request","version":"3.0.0-beta.6","keywords":["aofljs","@aofl/api-request","api request","api","cache response"],"author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/api-request@3.0.0-beta.6","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"contributors":[{"name":"Daniel Belisle","email":"daniel.belisle@aofl.com"},{"name":"Micah Blu","email":"micah.blu@aofl.com"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"e4a00fb83f4464e60909c6785e424858fee70e74","tarball":"https://registry.npmjs.org/@aofl/api-request/-/api-request-3.0.0-beta.6.tgz","fileCount":12,"integrity":"sha512-YlyLW7yy1WKjrjNKjrZ+3gmVkvs1nfySCgRAnPPrNyxBXy5pKfmOk1518X0Dr2/NmLVbH8vjoFkWzpPIBSRK4g==","signatures":[{"sig":"MEQCIAoX8ykrbvYUToSHvq61op5eTfMnIFdxehynFeY0EBViAiAlDIacdtX/b3DtQ41rZ6HjscMr9rXU8B+A50EqvKaMlg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":23007,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdnBViCRA9TVsSAnZWagAAT5MQAKBzGKgCALIkZ2DrP8m+\nY4X48g96EFdI5Fh8qIiwf4CeqELQwy8ZjiTsJvpVO13V04SvMyjLAn4U+Mn4\nPsRF5u1XvQWGWtrga37kaKDPLtrO7wxTHf1F7L8u5u81uFk61ubYs1mgypAF\nl3hwjeMa7qbrjV4ojQakqSCIKf8Pm/Eej3qghfWc14gJiQkuxKXeAx8HbIj7\nFwtl1idihSCJUw6MA7exx3KjmI1Sf0n1hJj1ymtrDue0aokIn4jMrnNFlcfx\nin8Gx4T7takkyoJZhGkh2uMBW/pkLV6XLgq1v3uxEch170/DvR30xwEvZVbv\n/gYYbvu/uhXgoqn6jKdV6XXPo8Xfydq4gd18UF8bRxwkTCZGHviVQUTW0BvJ\n3s+h0NgWS/pJVD/jCyuTWL52o7FiPLGNwz319vHfLb1QP0iijRmzTme82G9Z\nPP9C3QAzgTQX/E7uRmZGZO+t4N2jh+Z+n4uaIff51J0z7UhwnJwo6SqUUyck\n6WGj4SaIVyeYnccS23XP4+fjnAHNr0S3NssAF0cvUjHzDnp6QOn1WNBJXcR4\nNnvJryIUPpv6VBqk2hJwlbwa+U4eJ7ulPvnGsGK10VxLhg5Zgxu6PuqQ6lYz\n4uuXRMQtQCI+gA6WHK77DP+F1m2FvsGshA+3qjl0F0lC9hGlLCGe8sguw6kw\nbb8K\r\n=7+tT\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# @aofl/api-request\n\nA module for making api calls easier. Key features include caching responses and request/response formatters.\n\nCaching is implemented using @aofl/cache-manager and uses MemoryCache. @aofl/api-request caches the promises created by fetch api.\n\nRequest/response formatting referes to constructing a request payload and parsing the response payload. A formatter object should implement `pack()` and `unpack()` properties. `pack()` is to construct the request payload and `unpack()` is used to parse the response. Any number of formatters can be added to `apiRequestInstance` using the `addFromatter()` method. E.g. `GetFormatter`, `PostFormatter`, `CorsFormatter`, `FileUploadFormatter`, `GoogleMapsFormatter`, ....\n\n## Examples\n* [Basic Example](https://codesandbox.io/s/github/AgeOfLearning/aofl/tree/master/aofl-js-packages/api-request/examples/simple)\n\n\n## Installation\n```bash\nnpm i -S @aofl/api-request\n```\n\n## Usage\n```javascript\nimport {ApiRequest} from '@aofl/api-request';\n\nclass PostFormatter {\n  static pack(payload) {\n    const headers = new Headers();\n    const body = new FormData();\n    const boundary = 'Boundary-' + Date.now();\n\n    headers.append('Accept', '*/*');\n    headers.append('Content-Type', 'multipart/form-data; boundary=' + boundary);\n\n    if (typeof payload !== 'undefined') {\n      body.append('arguments', JSON.stringify(payload));\n    }\n\n    return {\n      method: 'POST',\n      headers,\n      body,\n      mode: 'cors',\n      credentails: 'include'\n    };\n  }\n\n  static unpack(response) {\n    return response.json()\n    .then((data) => {\n      if (data.status !== 'success') {\n        return Promise.reject(data);\n      }\n      return data;\n    });\n  }\n}\n\nconst apiRequestInstance = new ApiRequest();\napiRequestInstance.addFormatter('post', PostFormatter);\n\napiRequestInstance.request('https://example.org/', {}, 'post', true, 'sample-namespace')\n.then((jsonResponse) => {\n})\n.catch((jsonResponse) => {\n});\n```\n","gitHead":"23e8e9dd00e515c9305baf320436e43f51d7edd3","scripts":{"test":"echo \"Error: no test specified\" && exit 1","build":"cross-env NODE_ENV=production npx aofl build","build:dev":"cross-env NODE_ENV=development npx aofl build","prepublishOnly":"npm run build"},"_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"lerna/3.16.4/node@v10.16.3+x64 (darwin)","description":"A module for simplifying api calls","directories":{},"_nodeVersion":"10.16.3","_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"@aofl/cli":"^3.0.0-beta.6","cross-env":"^6.0.3","@aofl/cache-manager":"^3.0.0-beta.6"},"peerDependencies":{"@aofl/cache-manager":">= 3.0.0-beta.1 < 4.0.0"},"_npmOperationalInternal":{"tmp":"tmp/api-request_3.0.0-beta.6_1570510177849_0.5701496450797097","host":"s3://npm-registry-packages"}},"3.0.0-beta.8":{"name":"@aofl/api-request","version":"3.0.0-beta.8","keywords":["aofljs","@aofl/api-request","api request","api","cache response"],"author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/api-request@3.0.0-beta.8","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"contributors":[{"name":"Daniel Belisle","email":"daniel.belisle@aofl.com"},{"name":"Micah Blu","email":"micah.blu@aofl.com"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"eeac42c640e365ee7b6c5a6f8486e0ce83b67ab5","tarball":"https://registry.npmjs.org/@aofl/api-request/-/api-request-3.0.0-beta.8.tgz","fileCount":12,"integrity":"sha512-YxL83cpS3NsTMr7Y0Gp/BtMALz9rIzZcb4F1gTcC3wkizLnOQ8yafRaopyjY40im6DHMk7C53vtUb5lH1et6ig==","signatures":[{"sig":"MEYCIQChZnN0GzAbiqMwIzzWIle6JyzvbuJKYR4mH/tUruRZPwIhANnA9w214gDqpCAjxFRt+u80VTM8Ehv6FkjPYxIFibN6","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":23827,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdnCMbCRA9TVsSAnZWagAAtagP/Arg3dF9d/aDoeBCtDsT\ncYbsDhkP30KsCiJ5lFZndn9g8fYtUBCMynsuayZNyRfjArrEY3Ydu+jXyhJD\n1wfAS81RCALm30jsr1WI+1NT68YW85egzP2bj6nA/b9CZT5QQBt8SXfnWfF9\n2vy/KG5mk4sN4ZnU1lKuTQpGt13hgpSo0EfXeuMYyZ3fJPsShj2XQdfMuiMj\n3yjRZEz8UBANssPFDN9bDriEKr2kMu9XZxkrWVYyfsaLlBa/GfsghegIxDc6\nrcqqbLsbcIbu5RUKnjztuoOJDSHwgkDBTpvMaYW8G+OSOHl1sG4PeJwuWxuA\nEkhBkzwCI8JnVxLtH2nfIvP8nF2ypIxw3Rhhlo6Yklj9q2hPrlUlLdeciiNz\nOSR9MbpyAawv2VA3jpdZvOMkVDfigwAz2nUz6IFbmVsZEfi9hdaAV5BUL0C7\nfZeBWfnJgzX6TtarL3fB9gMBTKuCrC3Zx77tQZXem09XOI9enBfLAVn5nD5M\nU5hYjfLattOvIaUtHqR6VPciRyN2M37AIOvgZDPlq5/Xm2H1xlSLgLn1WMye\nLk9fK+1PVWW7cBC9339nLKxSHBQVTkGVIjP/f/xH1yTr8xGj59VAOEEQTFP4\nBIOa7bJEMH5rmWu2lPRRxM69FaCvBSLDrrLext7JM7FEupji2864jPQCKA9/\nuV3N\r\n=rx1v\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","module":"index.js","readme":"# @aofl/api-request\n\nA module for making api calls easier. Key features include caching responses and request/response formatters.\n\nCaching is implemented using @aofl/cache-manager and uses MemoryCache. @aofl/api-request caches the promises created by fetch api.\n\nRequest/response formatting referes to constructing a request payload and parsing the response payload. A formatter object should implement `pack()` and `unpack()` properties. `pack()` is to construct the request payload and `unpack()` is used to parse the response. Any number of formatters can be added to `apiRequestInstance` using the `addFromatter()` method. E.g. `GetFormatter`, `PostFormatter`, `CorsFormatter`, `FileUploadFormatter`, `GoogleMapsFormatter`, ....\n\n## Examples\n* [Basic Example](https://codesandbox.io/s/github/AgeOfLearning/aofl/tree/master/aofl-js-packages/api-request/examples/simple)\n\n\n## Installation\n```bash\nnpm i -S @aofl/api-request\n```\n\n## Usage\n```javascript\nimport {ApiRequest} from '@aofl/api-request';\n\nclass PostFormatter {\n  static pack(payload) {\n    const headers = new Headers();\n    const body = new FormData();\n    const boundary = 'Boundary-' + Date.now();\n\n    headers.append('Accept', '*/*');\n    headers.append('Content-Type', 'multipart/form-data; boundary=' + boundary);\n\n    if (typeof payload !== 'undefined') {\n      body.append('arguments', JSON.stringify(payload));\n    }\n\n    return {\n      method: 'POST',\n      headers,\n      body,\n      mode: 'cors',\n      credentails: 'include'\n    };\n  }\n\n  static unpack(response) {\n    return response.json()\n    .then((data) => {\n      if (data.status !== 'success') {\n        return Promise.reject(data);\n      }\n      return data;\n    });\n  }\n}\n\nconst apiRequestInstance = new ApiRequest();\napiRequestInstance.addFormatter('post', PostFormatter);\n\napiRequestInstance.request('https://example.org/', {}, 'post', true, 'sample-namespace')\n.then((jsonResponse) => {\n})\n.catch((jsonResponse) => {\n});\n```\n","gitHead":"31f766f3cf621147bfa1530b863757cb08e5fc10","scripts":{"test":"echo \"Error: no test specified\" && exit 1","build":"cross-env NODE_ENV=production npx aofl build","build:dev":"cross-env NODE_ENV=development npx aofl build","prepublishOnly":"npm run build"},"_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"lerna/3.16.4/node@v10.16.3+x64 (darwin)","description":"A module for simplifying api calls","directories":{},"_nodeVersion":"10.16.3","_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"@aofl/cli":"^3.0.0-beta.6","cross-env":"^6.0.3","@aofl/cache-manager":"^3.0.0-beta.8"},"peerDependencies":{"@aofl/cache-manager":">= 3.0.0-beta.1 < 4.0.0"},"_npmOperationalInternal":{"tmp":"tmp/api-request_3.0.0-beta.8_1570513691275_0.5789899722513545","host":"s3://npm-registry-packages"}},"3.0.0-beta.9":{"name":"@aofl/api-request","version":"3.0.0-beta.9","keywords":["aofljs","@aofl/api-request","api request","api","cache response"],"author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/api-request@3.0.0-beta.9","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"contributors":[{"name":"Daniel Belisle","email":"daniel.belisle@aofl.com"},{"name":"Micah Blu","email":"micah.blu@aofl.com"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"f592c41b702f95279b2e36530b6697da3fbb77f4","tarball":"https://registry.npmjs.org/@aofl/api-request/-/api-request-3.0.0-beta.9.tgz","fileCount":14,"integrity":"sha512-0DcYXCRFqrXmlNfLLZnZG8q1J/yp9zdptK/k9VuBjMdSbgOT7MXhwsRBh6BLstz6H8uOB0HbmUidK4VaIWSQdQ==","signatures":[{"sig":"MEUCIQCO5S9jT/4Szt6aL7Z/4FmS5fp6abOeOev6Au085P+zjgIgZDJo/hDofXIVn8WaJhx8coXm6N29iS+4W7PFCkwYiG8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26830,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdnCiZCRA9TVsSAnZWagAA0IsP/jqiNP8heUfWEpTUXAGY\nx2wecptjZ2XHrXbWv3aXS+NeONAdRD2cJbIvUB8x1X5/QdMr1sJ9GBrsLovq\nBjP2Kju9LmBFEP4O/26mG2swc4MsSEN+rhCMBONR2oxkLoNBEf+/+47GpRja\n4szGXrpgd5mhHdsqr/zfNI588ap808nc9g7PaSFBwzmbCkZWY1RLumrHZeYt\n/+uNk69p+eUeoj6l/N0zV1Ja1yvik7Jfh08rcMBug/IDs4DZwBQBrg3Tulpa\nDUkdRd2qdDeECEi6GJG2In6orNETY1mujsj+TYXmgeWyEJoR8GENUgBL8NMo\n0bcpuAU34CcQgaWV9aM90LH0ufWDx/G+rhsbYxF5gt/5vzriZ4lqn/D4hOAD\nddROvpIhTSTbM+u+1AgjwLiUFdgder4sKh+i7wiI7eKkjtTYovoCmOK0UFRd\nf52ZbosKfAI7XA26fYHEvZNzjAo0Wv0UJAq41cmBSjleq80UEp+depBwB0KE\nlnC8MxIsC1/XjEglqIyfGcHS7BN6VJwoMgNNQIYbATbCOyPJFS/Si0XF6vgz\nGT4E3NnK7hYfxrQCAkU2JtwrByWSCIc+x/rCiYkwEiIDxJVN0qAK+A/B4mAj\nt66cDKXKE5XO5UHFVm5Scosl7K6Unnr0wh34rybhL4A/CbD9r2+DzhJVONVC\nXjdG\r\n=68W9\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# @aofl/api-request\n\nA module for making api calls easier. Key features include caching responses and request/response formatters.\n\nCaching is implemented using @aofl/cache-manager and uses MemoryCache. @aofl/api-request caches the promises created by fetch api.\n\nRequest/response formatting referes to constructing a request payload and parsing the response payload. A formatter object should implement `pack()` and `unpack()` properties. `pack()` is to construct the request payload and `unpack()` is used to parse the response. Any number of formatters can be added to `apiRequestInstance` using the `addFromatter()` method. E.g. `GetFormatter`, `PostFormatter`, `CorsFormatter`, `FileUploadFormatter`, `GoogleMapsFormatter`, ....\n\n## Examples\n* [Basic Example](https://codesandbox.io/s/github/AgeOfLearning/aofl/tree/master/aofl-js-packages/api-request/examples/simple)\n\n\n## Installation\n```bash\nnpm i -S @aofl/api-request\n```\n\n## Usage\n```javascript\nimport {ApiRequest} from '@aofl/api-request';\n\nclass PostFormatter {\n  static pack(payload) {\n    const headers = new Headers();\n    const body = new FormData();\n    const boundary = 'Boundary-' + Date.now();\n\n    headers.append('Accept', '*/*');\n    headers.append('Content-Type', 'multipart/form-data; boundary=' + boundary);\n\n    if (typeof payload !== 'undefined') {\n      body.append('arguments', JSON.stringify(payload));\n    }\n\n    return {\n      method: 'POST',\n      headers,\n      body,\n      mode: 'cors',\n      credentails: 'include'\n    };\n  }\n\n  static unpack(response) {\n    return response.json()\n    .then((data) => {\n      if (data.status !== 'success') {\n        return Promise.reject(data);\n      }\n      return data;\n    });\n  }\n}\n\nconst apiRequestInstance = new ApiRequest();\napiRequestInstance.addFormatter('post', PostFormatter);\n\napiRequestInstance.request('https://example.org/', {}, 'post', true, 'sample-namespace')\n.then((jsonResponse) => {\n})\n.catch((jsonResponse) => {\n});\n```\n","gitHead":"e9e6bf24a51611b9b997dc99e770d43466ba063d","scripts":{"docs":"npx jsdoc -c .jsdocrc.json","test":"echo \"Error: no test specified\" && exit 1","build":"cross-env NODE_ENV=production npx aofl build","build:dev":"cross-env NODE_ENV=development npx aofl build","prepublishOnly":"npm run build && npm run docs"},"_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"lerna/3.16.4/node@v10.16.3+x64 (darwin)","description":"A module for simplifying api calls","directories":{},"_nodeVersion":"10.16.3","_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jsdoc":"^3.6.3","@aofl/cli":"^3.0.0-beta.6","cross-env":"^6.0.3","tsd-jsdoc":"^2.4.0","jsdoc-babel":"^0.5.0","@aofl/cache-manager":"^3.0.0-beta.9"},"peerDependencies":{"@aofl/cache-manager":">= 3.0.0-beta.1 < 4.0.0"},"_npmOperationalInternal":{"tmp":"tmp/api-request_3.0.0-beta.9_1570515097140_0.6989721919704279","host":"s3://npm-registry-packages"}},"3.0.0-beta.11":{"name":"@aofl/api-request","version":"3.0.0-beta.11","keywords":["aofljs","@aofl/api-request","api request","api","cache response"],"author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/api-request@3.0.0-beta.11","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"contributors":[{"name":"Daniel Belisle","email":"daniel.belisle@aofl.com"},{"name":"Micah Blu","email":"micah.blu@aofl.com"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"dd283f61aee9a91b7917127481d290e23017c7fd","tarball":"https://registry.npmjs.org/@aofl/api-request/-/api-request-3.0.0-beta.11.tgz","fileCount":13,"integrity":"sha512-1c5y22Lh30D3mwSuxkqMczISVJg04RpuVkx378kbPrXXx1y/MmZ3XJZrq++vXNKxw/6rTQAi1J7sboQUEVm4vQ==","signatures":[{"sig":"MEYCIQC8ZI6QPAut3ORcjLs3gfIw1BTK1d2kmPn4EEMjT+2EFgIhAJcxmtr/eaRbVz/rzIaFgVORmQg1ptSroG21rJiBYqPa","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26219,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdnFoZCRA9TVsSAnZWagAAeNwP/jtbItoEt0+PrGE1QT2R\n1vUwHSfksaLriYRqau6YGpFRLbwjqRHW3IBqoxWQC2B4tItjGAFXobbxHf2N\nVwNJhewonQ6hQm6OMweM2BmB+ksU7DBFoN/J6EbonHoo8Zy4ReePC4xkX68w\nIhfHk5BrawmSiceDCNucXKLnR5oIetBkVcougthZoIYpO6rDjOwqRxM1tFPo\nC2Toxnp3JorfWXKWXLvKlucRDgMpbCe+EAy7idhQu3NrSGeXM/nxHBKTgvKa\n2nzIXM3QHc8ZjWVX0ftRg6gAaHFTJ/hBOKN6YsVLuKisyIr6FRZYVntAhJ7e\nbi6zHLPnlqNmg3PM/h+tQPMNBvdNMwPVXpUWP004acR1jc+kQvsHPZoFYqAb\nj02W8ugXdrP4DDEKGpUw60lybtJxSexjmCbvngXmIHMetjcn3mw373DZcHvN\nK6lmL9ltEaY61gz2Q8qyCUcn9sh3Q/XZFTZYo92jfQgCcf3Mxq01aGyr/P1f\nS8prkEkiweMKlzJ3NUrLu8ugDMRBtsywRLxlHyVTZlf0Bh6r/AZOl8IGZUqc\nO8WwwHUqBmsDp/z8FbhyZcc7hMsYQuHcJlwBxoOnMYocTP8T913xnTUvmUTK\nOG8dRG9oKvyAnWQTQPWXZ2g3hKy3f5kfOfuDY76Fr9UnMkjLgDNYRptdi19+\nAaOn\r\n=XfwO\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# @aofl/api-request\n\nA module for making api calls easier. Key features include caching responses and request/response formatters.\n\nCaching is implemented using @aofl/cache-manager and uses MemoryCache. @aofl/api-request caches the promises created by fetch api.\n\nRequest/response formatting referes to constructing a request payload and parsing the response payload. A formatter object should implement `pack()` and `unpack()` properties. `pack()` is to construct the request payload and `unpack()` is used to parse the response. Any number of formatters can be added to `apiRequestInstance` using the `addFromatter()` method. E.g. `GetFormatter`, `PostFormatter`, `CorsFormatter`, `FileUploadFormatter`, `GoogleMapsFormatter`, ....\n\n## Examples\n* [Basic Example](https://codesandbox.io/s/github/AgeOfLearning/aofl/tree/master/aofl-js-packages/api-request/examples/simple)\n\n\n## Installation\n```bash\nnpm i -S @aofl/api-request\n```\n\n## Usage\n```javascript\nimport {ApiRequest} from '@aofl/api-request';\n\nclass PostFormatter {\n  static pack(payload) {\n    const headers = new Headers();\n    const body = new FormData();\n    const boundary = 'Boundary-' + Date.now();\n\n    headers.append('Accept', '*/*');\n    headers.append('Content-Type', 'multipart/form-data; boundary=' + boundary);\n\n    if (typeof payload !== 'undefined') {\n      body.append('arguments', JSON.stringify(payload));\n    }\n\n    return {\n      method: 'POST',\n      headers,\n      body,\n      mode: 'cors',\n      credentails: 'include'\n    };\n  }\n\n  static unpack(response) {\n    return response.json()\n    .then((data) => {\n      if (data.status !== 'success') {\n        return Promise.reject(data);\n      }\n      return data;\n    });\n  }\n}\n\nconst apiRequestInstance = new ApiRequest();\napiRequestInstance.addFormatter('post', PostFormatter);\n\napiRequestInstance.request('https://example.org/', {}, 'post', true, 'sample-namespace')\n.then((jsonResponse) => {\n})\n.catch((jsonResponse) => {\n});\n```\n","gitHead":"ad7cdc30523ea031f8d1bf5c62440f80f75a7308","scripts":{"docs":"jsdoc -c .jsdocrc.json .","test":"echo \"Error: no test specified\" && exit 1","build":"cross-env NODE_ENV=production aofl build","build:dev":"cross-env NODE_ENV=development aofl build","prepublishOnly":"npm run build && npm run docs"},"typings":"types.d.ts","_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"lerna/3.16.4/node@v10.16.3+x64 (darwin)","description":"A module for simplifying api calls","directories":{},"_nodeVersion":"10.16.3","_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jsdoc":"^3.6.3","@aofl/cli":"^3.0.0-beta.10","cross-env":"^6.0.3","tsd-jsdoc":"^2.4.0","jsdoc-babel":"^0.5.0","@aofl/cache-manager":"^3.0.0-beta.11"},"peerDependencies":{"@aofl/cache-manager":">= 3.0.0-beta.1 < 4.0.0"},"_npmOperationalInternal":{"tmp":"tmp/api-request_3.0.0-beta.11_1570527768659_0.6655113437193265","host":"s3://npm-registry-packages"}},"3.0.0-beta.12":{"name":"@aofl/api-request","version":"3.0.0-beta.12","keywords":["aofljs","@aofl/api-request","api request","api","cache response"],"author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/api-request@3.0.0-beta.12","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"contributors":[{"name":"Daniel Belisle","email":"daniel.belisle@aofl.com"},{"name":"Micah Blu","email":"micah.blu@aofl.com"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"50b65841772a2fd95012e5c3736730cf3fac8e34","tarball":"https://registry.npmjs.org/@aofl/api-request/-/api-request-3.0.0-beta.12.tgz","fileCount":13,"integrity":"sha512-MWi8e8yciwfC8Q/7adHybQajS/Guc4GVVgTSQB+cKMbkXSklZ01IXt49f+C9kNUlbXijMUyZFUbgqBCOQkX3pg==","signatures":[{"sig":"MEUCIES5XNrkr8peWOOqI69j05cq1x54IBgIRc/LVHqjnyC5AiEAh9ha44h2IAZLHUnVcFBAIROjE+3bEhXUJMOsW3wal10=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26870,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdnFyfCRA9TVsSAnZWagAAn68QAJuSzOjztjpkySrPL7ZA\ns2KAO/e6/3Vc6KCynl4Y62RHFxf0vW4ViLEJxsdYdEP/f7NieS/OO7pGVjYD\nvIBw+ImJ+7UWWXM4i0lzonMHM0gYMRhD3YTAxqHYWx8A+gDDba4oN2Gjcx1p\nnuDgei0Xo3L3dp249Rcv/2H2NiEaFBsrCfVvabrJvFRKZhSeERRSmnGoDosP\nFhrxSbsqaMakRDdUXZmA1cG7BJBq6dmoHOaKaVY8GGe1GZAAP8J+MAShtst8\nccKLUvhSCjJXtoS6ECO+/nqqEpf/0m3hiThvLnR++2IBeTRhy44bXMW9SW45\nE+Up2E8aVFccTdaXeBlCfcPWWX+6L/9LXMnLQErIWnZnoqkYUPwZ/V+UwA7h\nxYhUtNWKeKV6ISebI7boE1C9abOCRyVRBAZ0mLthuLGBdF9iL6s+zaF2iubj\nNsb38R9RtLmSf/9mNlNfLOgmzM8qXGQJMU//k5ezHQRQn3hXV5jRNXeCubxT\n/dP1XCTfc6Gfbly02Ft25pEZvIJ7LnzyUgrd1msYSzkXMByslvHR08WIAbNy\nwuQq0ma4eLdGO7eumYIjwlKYKKOET0TNozj2zOWk5MIkwV4TZ/r2sRJvz6/J\nj36QN2hyMVypxUWBK8EMCKQNOpNtUMK3AZaSWdAohOiJnAPSy4U/jxTvyRho\nb5FR\r\n=qZUi\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# @aofl/api-request\n\nA module for making api calls easier. Key features include caching responses and request/response formatters.\n\nCaching is implemented using @aofl/cache-manager and uses MemoryCache. @aofl/api-request caches the promises created by fetch api.\n\nRequest/response formatting referes to constructing a request payload and parsing the response payload. A formatter object should implement `pack()` and `unpack()` properties. `pack()` is to construct the request payload and `unpack()` is used to parse the response. Any number of formatters can be added to `apiRequestInstance` using the `addFromatter()` method. E.g. `GetFormatter`, `PostFormatter`, `CorsFormatter`, `FileUploadFormatter`, `GoogleMapsFormatter`, ....\n\n## Examples\n* [Basic Example](https://codesandbox.io/s/github/AgeOfLearning/aofl/tree/master/aofl-js-packages/api-request/examples/simple)\n\n\n## Installation\n```bash\nnpm i -S @aofl/api-request\n```\n\n## Usage\n```javascript\nimport {ApiRequest} from '@aofl/api-request';\n\nclass PostFormatter {\n  static pack(payload) {\n    const headers = new Headers();\n    const body = new FormData();\n    const boundary = 'Boundary-' + Date.now();\n\n    headers.append('Accept', '*/*');\n    headers.append('Content-Type', 'multipart/form-data; boundary=' + boundary);\n\n    if (typeof payload !== 'undefined') {\n      body.append('arguments', JSON.stringify(payload));\n    }\n\n    return {\n      method: 'POST',\n      headers,\n      body,\n      mode: 'cors',\n      credentails: 'include'\n    };\n  }\n\n  static unpack(response) {\n    return response.json()\n    .then((data) => {\n      if (data.status !== 'success') {\n        return Promise.reject(data);\n      }\n      return data;\n    });\n  }\n}\n\nconst apiRequestInstance = new ApiRequest();\napiRequestInstance.addFormatter('post', PostFormatter);\n\napiRequestInstance.request('https://example.org/', {}, 'post', true, 'sample-namespace')\n.then((jsonResponse) => {\n})\n.catch((jsonResponse) => {\n});\n```\n","gitHead":"7fefe74af1885e7b807b6ed3522d9ae661e52645","scripts":{"docs":"jsdoc -c .jsdocrc.json .","test":"echo \"Error: no test specified\" && exit 1","build":"cross-env NODE_ENV=production aofl build","build:dev":"cross-env NODE_ENV=development aofl build","prepublishOnly":"npm run build && npm run docs"},"typings":"types.d.ts","_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"lerna/3.16.4/node@v10.16.3+x64 (darwin)","description":"A module for simplifying api calls","directories":{},"_nodeVersion":"10.16.3","_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jsdoc":"^3.6.3","@aofl/cli":"^3.0.0-beta.10","cross-env":"^6.0.3","tsd-jsdoc":"^2.4.0","jsdoc-babel":"^0.5.0","@aofl/cache-manager":"^3.0.0-beta.12"},"peerDependencies":{"@aofl/cache-manager":">= 3.0.0-beta.1 < 4.0.0"},"_npmOperationalInternal":{"tmp":"tmp/api-request_3.0.0-beta.12_1570528414514_0.5264353646958613","host":"s3://npm-registry-packages"}},"3.0.0-beta.13":{"name":"@aofl/api-request","version":"3.0.0-beta.13","keywords":["aofljs","@aofl/api-request","api request","api","cache response"],"author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/api-request@3.0.0-beta.13","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"contributors":[{"name":"Daniel Belisle","email":"daniel.belisle@aofl.com"},{"name":"Micah Blu","email":"micah.blu@aofl.com"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"f9bca1fb2c170ece310b8b19ec7045372ee6e6bf","tarball":"https://registry.npmjs.org/@aofl/api-request/-/api-request-3.0.0-beta.13.tgz","fileCount":13,"integrity":"sha512-ful9hy+GEspyRML9qLV+T0PPKCxJ3BgNNSITNpLhNmIPyM94c50uG4j7QIRHmnP9GQNOFKg70SrDg3SOjsHkSA==","signatures":[{"sig":"MEUCIEXxYvY24YVpwGt3VuQ5eoN3F7cci0+GBmR1dajoe51EAiEA0F2VrYA/p815vnl1MzMDHR/MMPcOjzXgStnTySrj8VM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26894,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdnV5iCRA9TVsSAnZWagAApegP/3iXFjqFzkpv8BZsBelZ\nGngU7iHLK+3+tnZzlOZtwvtEfkgtHNoQWEZoxyhHXrKDia4rspCAsVlLWYlv\nFro8hc4IBPBpmytFac5WdzLgcDsUjw6wPZX4zWZiJP+hU/0T5tkwDxPsfjwN\nOTtxfdl6OQ6v8d6MuqZL7v2qOiP/jmYpf+iRJIFN7EIZWjmJ3b+zpey/tQvM\novnnW+KgHtPSBdAHlXgtm9GEp1BbynoqwSdrevT3xmJChoPxcaSkILgJyYC9\nWLfvtvqQPtzl2bZ0TZOGkaZhV+/5iuHnk3WY28kzfUxfNmEJXDSTHJgFCH0o\nmrgpQABJTrLo3OTZbPtN0DbNRkYy0/JBzoP+sPajkNNvs9bGifmPnt+PWvFp\nYPFanPSBYNOdZ9E7pJ1zZFhSiYlWFqOAIuskba0S74o7tjFC3GznDkPgnyia\nMLIGQTIsaBXXXecPD/9rtEVMsnTX+t7sv0hTFWQ3h9WdIR+9AJAjMRnKSbCu\nBNVLKkO8J6cElXwiVntnEzK3+MdJUcTVtgZ31q/5+hn9wgaxucCLuirnw8TG\nXGhM4wixWssuYbcpRezQMitBdxL2JDU1mrDbgOpMkHwA02MHVL83gPHzxB6Z\nL8nmGTIrSqA7Q8Q0uT3hFuacxdyB/YQKw3j6hjQO/Xv3JqR6rmCzzo0w4TzU\nA41G\r\n=Fg1O\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","module":"index.js","readme":"# @aofl/api-request\n\nA module for making api calls easier. Key features include caching responses and request/response formatters.\n\nCaching is implemented using @aofl/cache-manager and uses MemoryCache. @aofl/api-request caches the promises created by fetch api.\n\nRequest/response formatting referes to constructing a request payload and parsing the response payload. A formatter object should implement `pack()` and `unpack()` properties. `pack()` is to construct the request payload and `unpack()` is used to parse the response. Any number of formatters can be added to `apiRequestInstance` using the `addFromatter()` method. E.g. `GetFormatter`, `PostFormatter`, `CorsFormatter`, `FileUploadFormatter`, `GoogleMapsFormatter`, ....\n\n## Examples\n* [Basic Example](https://codesandbox.io/s/github/AgeOfLearning/aofl/tree/master/aofl-js-packages/api-request/examples/simple)\n\n\n## Installation\n```bash\nnpm i -S @aofl/api-request\n```\n\n## Usage\n```javascript\nimport {ApiRequest} from '@aofl/api-request';\n\nclass PostFormatter {\n  static pack(payload) {\n    const headers = new Headers();\n    const body = new FormData();\n    const boundary = 'Boundary-' + Date.now();\n\n    headers.append('Accept', '*/*');\n    headers.append('Content-Type', 'multipart/form-data; boundary=' + boundary);\n\n    if (typeof payload !== 'undefined') {\n      body.append('arguments', JSON.stringify(payload));\n    }\n\n    return {\n      method: 'POST',\n      headers,\n      body,\n      mode: 'cors',\n      credentails: 'include'\n    };\n  }\n\n  static unpack(response) {\n    return response.json()\n    .then((data) => {\n      if (data.status !== 'success') {\n        return Promise.reject(data);\n      }\n      return data;\n    });\n  }\n}\n\nconst apiRequestInstance = new ApiRequest();\napiRequestInstance.addFormatter('post', PostFormatter);\n\napiRequestInstance.request('https://example.org/', {}, 'post', true, 'sample-namespace')\n.then((jsonResponse) => {\n})\n.catch((jsonResponse) => {\n});\n```\n","gitHead":"aa2e52c46ae9451fde097de4734398430f2127a7","scripts":{"docs":"jsdoc -c .jsdocrc.json .","test":"echo \"Error: no test specified\" && exit 1","build":"cross-env NODE_ENV=production aofl build","build:dev":"cross-env NODE_ENV=development aofl build","prepublishOnly":"npm run build && npm run docs"},"typings":"types.d.ts","_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"lerna/3.16.4/node@v10.16.3+x64 (darwin)","description":"A module for simplifying api calls","directories":{},"_nodeVersion":"10.16.3","_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jsdoc":"^3.6.3","@aofl/cli":"^3.0.0-beta.13","cross-env":"^6.0.3","tsd-jsdoc":"^2.4.0","jsdoc-babel":"^0.5.0","@aofl/cache-manager":"^3.0.0-beta.13"},"peerDependencies":{"@aofl/cache-manager":">= 3.0.0-beta.1 < 4.0.0"},"_npmOperationalInternal":{"tmp":"tmp/api-request_3.0.0-beta.13_1570594401623_0.3274650123161673","host":"s3://npm-registry-packages"}},"3.0.0-beta.14":{"name":"@aofl/api-request","version":"3.0.0-beta.14","keywords":["aofljs","@aofl/api-request","api request","api","cache response"],"author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/api-request@3.0.0-beta.14","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"contributors":[{"name":"Daniel Belisle","email":"daniel.belisle@aofl.com"},{"name":"Micah Blu","email":"micah.blu@aofl.com"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"83734eb3f560ca54236478e1e99283be9ade3631","tarball":"https://registry.npmjs.org/@aofl/api-request/-/api-request-3.0.0-beta.14.tgz","fileCount":13,"integrity":"sha512-NBWq/Py07lmqQpuznz5ik+c5wXsRJl9rRRzpBgBM9QKi5NXPAdp8QweTlSF3Ku7+knER+Fc67zgru+aMZJXGVA==","signatures":[{"sig":"MEUCIQDhH66oC1BTur08Nx8wSL0eXTHJpdiqWPu7u8irmbK6HwIgZhVmwezEHfQTb3+xxyMuSzbDtCgpSPnsFUCH6tYOHoM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26919,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdnWL/CRA9TVsSAnZWagAAluEP/RUMtXgQlyspIDBSdj2p\nqPNF/XzDwNrZVaznUZLMAYLLo4o3H9+dfVN/PD0Na8A+3hRfRWkcrkuHkOGo\njMNRv4llnmA1pmjqN9O1Bbz8IdmLf/2fk3crMnjf0rJBjOO+Q53bJrP3yJK7\nVaGpltwgMRLHTRyUe2ZXzOUiCirzPQYGZRNxy+zQVfBK82E11auK9TNGGLic\nOOUjS2rX3mYndGlKq6jUQylR1t5GxD2yeXVmsnSRa94K8dTV3q4o80T5/jzH\nMNgNVF9snG91ZVA9eV/fJ6246SHVWzlVu9CqQaE1/Qyy1erxzJftkeb9lkxF\n4fS7i0WSJZmiKZZ7Nw/UaorgkhJIrGLnnqMIUZpwR9NsnWyjIC5I3I5nb6w8\nXyiFKmByNBht2VN0ZmAhRRj3N969OFjJx4mg1xWTOJJD3LgGNlQO0uBIyaf4\njItyrLj28D4g05Hhqozkzn8Zb1lMQ95RhQS8HDjll7jRVPlbns8OTTMgsKNQ\nwNSONDvf6t44TXQdGy/yXGw5NPLnInCf9D6wcpQqK/pm9j2uzu3gL6Ya4T5z\nu3iNScoQLESmgnJa7GpMJ6/ZPdXG+sUGU8QDXnKdEo8oaEo64OMOPpgrJzPQ\nEDHBOjm9YY0JZax3xGTJ6GZvr4KyJYtjs2RZ26xPifV4kYiXLq2qdD2ous+D\nE7oY\r\n=ixFl\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","module":"index.js","readme":"# @aofl/api-request\n\nA module for making api calls easier. Key features include caching responses and request/response formatters.\n\nCaching is implemented using @aofl/cache-manager and uses MemoryCache. @aofl/api-request caches the promises created by fetch api.\n\nRequest/response formatting referes to constructing a request payload and parsing the response payload. A formatter object should implement `pack()` and `unpack()` properties. `pack()` is to construct the request payload and `unpack()` is used to parse the response. Any number of formatters can be added to `apiRequestInstance` using the `addFromatter()` method. E.g. `GetFormatter`, `PostFormatter`, `CorsFormatter`, `FileUploadFormatter`, `GoogleMapsFormatter`, ....\n\n## Examples\n* [Basic Example](https://codesandbox.io/s/github/AgeOfLearning/aofl/tree/master/aofl-js-packages/api-request/examples/simple)\n\n\n## Installation\n```bash\nnpm i -S @aofl/api-request\n```\n\n## Usage\n```javascript\nimport {ApiRequest} from '@aofl/api-request';\n\nclass PostFormatter {\n  static pack(payload) {\n    const headers = new Headers();\n    const body = new FormData();\n    const boundary = 'Boundary-' + Date.now();\n\n    headers.append('Accept', '*/*');\n    headers.append('Content-Type', 'multipart/form-data; boundary=' + boundary);\n\n    if (typeof payload !== 'undefined') {\n      body.append('arguments', JSON.stringify(payload));\n    }\n\n    return {\n      method: 'POST',\n      headers,\n      body,\n      mode: 'cors',\n      credentails: 'include'\n    };\n  }\n\n  static unpack(response) {\n    return response.json()\n    .then((data) => {\n      if (data.status !== 'success') {\n        return Promise.reject(data);\n      }\n      return data;\n    });\n  }\n}\n\nconst apiRequestInstance = new ApiRequest();\napiRequestInstance.addFormatter('post', PostFormatter);\n\napiRequestInstance.request('https://example.org/', {}, 'post', true, 'sample-namespace')\n.then((jsonResponse) => {\n})\n.catch((jsonResponse) => {\n});\n```\n","browser":"dist/index.js","gitHead":"80c0c882f3af67f4584dc8d38de8a62ca5632c94","scripts":{"docs":"jsdoc -c .jsdocrc.json .","test":"echo \"Error: no test specified\" && exit 1","build":"cross-env NODE_ENV=production aofl build","build:dev":"cross-env NODE_ENV=development aofl build","prepublishOnly":"npm run build && npm run docs"},"typings":"types.d.ts","_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"lerna/3.16.4/node@v10.16.3+x64 (darwin)","description":"A module for simplifying api calls","directories":{},"_nodeVersion":"10.16.3","_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jsdoc":"^3.6.3","@aofl/cli":"^3.0.0-beta.14","cross-env":"^6.0.3","tsd-jsdoc":"^2.4.0","jsdoc-babel":"^0.5.0","@aofl/cache-manager":"^3.0.0-beta.14"},"peerDependencies":{"@aofl/cache-manager":">= 3.0.0-beta.1 < 4.0.0"},"_npmOperationalInternal":{"tmp":"tmp/api-request_3.0.0-beta.14_1570595582765_0.30953483002111626","host":"s3://npm-registry-packages"}},"3.0.0-beta.15":{"name":"@aofl/api-request","version":"3.0.0-beta.15","keywords":["aofljs","@aofl/api-request","api request","api","cache response"],"author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/api-request@3.0.0-beta.15","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"contributors":[{"name":"Daniel Belisle","email":"daniel.belisle@aofl.com"},{"name":"Micah Blu","email":"micah.blu@aofl.com"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"5b2d968e6b4fb8416a564a3086f94c1a20e5b2d9","tarball":"https://registry.npmjs.org/@aofl/api-request/-/api-request-3.0.0-beta.15.tgz","fileCount":13,"integrity":"sha512-aZEoPfWOlwGus1sb9OOcOMOIxR9qysJfzYxE2aMwiWvbLLgQzFk9zQ2neAgTPRQ2SqCb9BcrvlO7V6toFwVxjQ==","signatures":[{"sig":"MEYCIQCEyXf54bHz7mlrc8geYglrD9BOYza4xo/QAg4v9KD7/gIhAJqJof5WQiFduyCudk3Q2L0RaYQPZZ/YRc5eW9Ytbphm","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26919,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdnWchCRA9TVsSAnZWagAA+mQP/R422l8x7xIEGFTGFNFt\nGTIKDRjRPINnYLW1LSldp9TjcUmqxHy9z3yZumSbqGDA7qKVjG93een0EVrx\nu5zCsPvHAAeThVsX30xBkxEEf/KOPduMnCpCAeru/2RcdgUk4TlFZOr2JvLy\n990ZLMA/LByFKKgnNgEayGQlCKK95OsxpLrLtHDF5232T8VZjENgIhRMxHbe\nXgtQCmkaQZGcG14tUbFgxezFNl3IHRXaS5Gp0OkRpt4uCIbLcFeqq2tbt297\nE3fKHbTM0YUlzdmJhHKcQHyIL2Us2Qu+i0zQgXzCvd59HpBV3pawOYn6jeo2\nRRGWoHDcStqXSdbGw2QmXR1GvsNXdWZuRQ32xRcL5aZUt0iaOdMhuXnEeJwt\nB72+0ddaA70/Su9j5GA5YqmOIk9PBGjpz82BYLjCNA1Ml28mFSmt+Gh5rU+g\ngx/vagMfBVukJWBFxdw8P7e45bztmPJS+UlrldQj26s17I7H/G9KhhkWOtw9\naVlzMAcnAf1lyJEu8Yv2WoDynX0klizugt7grJuqYfFpW4C2JM6sTDSh0Dag\nQzPI/uUc1kyXNG7VKZtqAP+FIcI8dp7FGNv6tkOGiq7M+Fk1cRKzl0jPLhuX\n5TagtOPiqiOLvd/nUz+Huh17HHhfa8PHrqUkfGoF2UQRPO5K5sWCry9J6Egt\nUDDx\r\n=qOlE\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","module":"index.js","readme":"# @aofl/api-request\n\nA module for making api calls easier. Key features include caching responses and request/response formatters.\n\nCaching is implemented using @aofl/cache-manager and uses MemoryCache. @aofl/api-request caches the promises created by fetch api.\n\nRequest/response formatting referes to constructing a request payload and parsing the response payload. A formatter object should implement `pack()` and `unpack()` properties. `pack()` is to construct the request payload and `unpack()` is used to parse the response. Any number of formatters can be added to `apiRequestInstance` using the `addFromatter()` method. E.g. `GetFormatter`, `PostFormatter`, `CorsFormatter`, `FileUploadFormatter`, `GoogleMapsFormatter`, ....\n\n## Examples\n* [Basic Example](https://codesandbox.io/s/github/AgeOfLearning/aofl/tree/master/aofl-js-packages/api-request/examples/simple)\n\n\n## Installation\n```bash\nnpm i -S @aofl/api-request\n```\n\n## Usage\n```javascript\nimport {ApiRequest} from '@aofl/api-request';\n\nclass PostFormatter {\n  static pack(payload) {\n    const headers = new Headers();\n    const body = new FormData();\n    const boundary = 'Boundary-' + Date.now();\n\n    headers.append('Accept', '*/*');\n    headers.append('Content-Type', 'multipart/form-data; boundary=' + boundary);\n\n    if (typeof payload !== 'undefined') {\n      body.append('arguments', JSON.stringify(payload));\n    }\n\n    return {\n      method: 'POST',\n      headers,\n      body,\n      mode: 'cors',\n      credentails: 'include'\n    };\n  }\n\n  static unpack(response) {\n    return response.json()\n    .then((data) => {\n      if (data.status !== 'success') {\n        return Promise.reject(data);\n      }\n      return data;\n    });\n  }\n}\n\nconst apiRequestInstance = new ApiRequest();\napiRequestInstance.addFormatter('post', PostFormatter);\n\napiRequestInstance.request('https://example.org/', {}, 'post', true, 'sample-namespace')\n.then((jsonResponse) => {\n})\n.catch((jsonResponse) => {\n});\n```\n","browser":"dist/index.js","gitHead":"0fab45fd3f4a1789a3683dbaece87d579e9de597","scripts":{"docs":"jsdoc -c .jsdocrc.json .","test":"echo \"Error: no test specified\" && exit 1","build":"cross-env NODE_ENV=production aofl build","build:dev":"cross-env NODE_ENV=development aofl build","prepublishOnly":"npm run build && npm run docs"},"typings":"types.d.ts","_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"lerna/3.16.4/node@v10.16.3+x64 (darwin)","description":"A module for simplifying api calls","directories":{},"_nodeVersion":"10.16.3","_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jsdoc":"^3.6.3","@aofl/cli":"^3.0.0-beta.15","cross-env":"^6.0.3","tsd-jsdoc":"^2.4.0","jsdoc-babel":"^0.5.0","@aofl/cache-manager":"^3.0.0-beta.15"},"peerDependencies":{"@aofl/cache-manager":">= 3.0.0-beta.1 < 4.0.0"},"_npmOperationalInternal":{"tmp":"tmp/api-request_3.0.0-beta.15_1570596641331_0.9001640963382478","host":"s3://npm-registry-packages"}},"3.0.0-beta.16":{"name":"@aofl/api-request","version":"3.0.0-beta.16","keywords":["aofljs","@aofl/api-request","api request","api","cache response"],"author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/api-request@3.0.0-beta.16","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"contributors":[{"name":"Daniel Belisle","email":"daniel.belisle@aofl.com"},{"name":"Micah Blu","email":"micah.blu@aofl.com"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"c33a38f0344bbe05a8653167fd5561c064c03210","tarball":"https://registry.npmjs.org/@aofl/api-request/-/api-request-3.0.0-beta.16.tgz","fileCount":14,"integrity":"sha512-UlqG8UrF3+wmZjvBlHNKutkjwkfB2+0OCXmWmCF+WV0dmQqat1aYcE+qA+PAHru8zao2RMimySxCXGhxoySkbg==","signatures":[{"sig":"MEUCIEEtVwfN4MrneUTTuQMIetAwhGChi6Mys+Fh9MtYdbXSAiEAvLt/w9hgRDrBzZHl8230PnoIXkeq3EfNkNnzdOsYCmw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26960,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdnWq3CRA9TVsSAnZWagAA1REQAI/50dlZSI6/qr8B/OW0\n7+Rox18SfLxf6fGyOcZ51FbhkEI6CwJ0yppeFx5ccjUnY4ayf6mJK75AXHiw\nxb8kYGMBHOuhD0uW31RGUX16u9fKeKJj9GFGaCnbnCkj5KQMGt4EnakQxAQh\nuidXUtyeRs3u69ejGbVWTzoanusLC2jZyLOpFVbMYZP6g6j3Y5SMqBv/chQO\nssOdK9jUHiTxAgYrli0wgUw9fT5xnth4O8ndneWfKYzmcbVqXg0eMqVGQKIC\n94ZPOp6oQUrioxfIjXiDjq4W7AMIrFa4zqcLjRUL6Tj1veL1m2mH/gKGcBWA\nJqLH1PfNZ2zWGKCObMiNb/YL80czBx3SZ1V+WTofXOnc3yYDWq5cnbIx5Wwu\nvB7kDaPZTP7CUWqNBuqiU2dJp6kwAUKeg1Qw7ExeejMJsGgvoD+bIzRGn/Qm\nUkl95uKkDVZc53vC4rpvz5G6ep2pvTXD72ZOPzxd9OxwVGmlL5JWw7PBrPHs\nli6xX5cdjfZLvLxwbKe9nBKfjpg4ynfCyhD/D0DT1928x/0069wOlKtZ8OuS\nFhLyCVohpI/aWowyPjEvUkDpx9HQQqaSAmSYonc6IvtUowh+8gPLEM6Imkss\nqBAvYqjy1U/bzNajFdVLx+TTT5mqlziBdoZE14VDRIsaZ0YFNavrWYETtToS\n1OhC\r\n=Bm+P\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","module":"index.js","readme":"# @aofl/api-request\n\nA module for making api calls easier. Key features include caching responses and request/response formatters.\n\nCaching is implemented using @aofl/cache-manager and uses MemoryCache. @aofl/api-request caches the promises created by fetch api.\n\nRequest/response formatting referes to constructing a request payload and parsing the response payload. A formatter object should implement `pack()` and `unpack()` properties. `pack()` is to construct the request payload and `unpack()` is used to parse the response. Any number of formatters can be added to `apiRequestInstance` using the `addFromatter()` method. E.g. `GetFormatter`, `PostFormatter`, `CorsFormatter`, `FileUploadFormatter`, `GoogleMapsFormatter`, ....\n\n## Examples\n* [Basic Example](https://codesandbox.io/s/github/AgeOfLearning/aofl/tree/master/aofl-js-packages/api-request/examples/simple)\n\n\n## Installation\n```bash\nnpm i -S @aofl/api-request\n```\n\n## Usage\n```javascript\nimport {ApiRequest} from '@aofl/api-request';\n\nclass PostFormatter {\n  static pack(payload) {\n    const headers = new Headers();\n    const body = new FormData();\n    const boundary = 'Boundary-' + Date.now();\n\n    headers.append('Accept', '*/*');\n    headers.append('Content-Type', 'multipart/form-data; boundary=' + boundary);\n\n    if (typeof payload !== 'undefined') {\n      body.append('arguments', JSON.stringify(payload));\n    }\n\n    return {\n      method: 'POST',\n      headers,\n      body,\n      mode: 'cors',\n      credentails: 'include'\n    };\n  }\n\n  static unpack(response) {\n    return response.json()\n    .then((data) => {\n      if (data.status !== 'success') {\n        return Promise.reject(data);\n      }\n      return data;\n    });\n  }\n}\n\nconst apiRequestInstance = new ApiRequest();\napiRequestInstance.addFormatter('post', PostFormatter);\n\napiRequestInstance.request('https://example.org/', {}, 'post', true, 'sample-namespace')\n.then((jsonResponse) => {\n})\n.catch((jsonResponse) => {\n});\n```\n","browser":"dist/index.js","gitHead":"32c2f889b64c30fba2458f8704f7c135b47c5b95","scripts":{"docs":"jsdoc -c .jsdocrc.json .","test":"echo \"Error: no test specified\" && exit 1","build":"cross-env NODE_ENV=production aofl build","build:dev":"cross-env NODE_ENV=development aofl build","prepublishOnly":"npm run build && npm run docs"},"typings":"types.d.ts","_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"lerna/3.16.4/node@v10.16.3+x64 (darwin)","description":"A module for simplifying api calls","directories":{},"_nodeVersion":"10.16.3","_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jsdoc":"^3.6.3","@aofl/cli":"^3.0.0-beta.15","cross-env":"^6.0.3","tsd-jsdoc":"^2.4.0","jsdoc-babel":"^0.5.0","@aofl/cache-manager":"^3.0.0-beta.16"},"peerDependencies":{"@aofl/cache-manager":">= 3.0.0-beta.1 < 4.0.0"},"_npmOperationalInternal":{"tmp":"tmp/api-request_3.0.0-beta.16_1570597558902_0.43222776568257903","host":"s3://npm-registry-packages"}},"3.0.0-beta.22":{"name":"@aofl/api-request","version":"3.0.0-beta.22","keywords":["aofljs","@aofl/api-request","api request","api","cache response"],"author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/api-request@3.0.0-beta.22","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"contributors":[{"name":"Daniel Belisle","email":"daniel.belisle@aofl.com"},{"name":"Micah Blu","email":"micah.blu@aofl.com"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"6bf42f946d4c81af1fd6ef3a4450e7655aeb6b66","tarball":"https://registry.npmjs.org/@aofl/api-request/-/api-request-3.0.0-beta.22.tgz","fileCount":14,"integrity":"sha512-EdGoePGqRAPpdgQ8S+Rtdo9ixOAnuOOIa55grt2f6zYUYdTFfdc/FeuyCl3p9a111I1EtIK+AJjACPEe3NLIvg==","signatures":[{"sig":"MEUCIHZk2tT1z7yHOUr9HreqR+2b3mDlg1Rg9IS4o6kvSdBqAiEA3Wmt2XB7cpHeTq0vUtwOfzlmAjrLjpKo8Wp0ArMrIpw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26960,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdoAfQCRA9TVsSAnZWagAA1CwP/2UCsXkCyWikZKkjKuA2\nsXrK+tDXIqyEz8HGoty1USTDOL5yddqA8IblfYanMtT2gcV8AiEtxUWtnyDa\n8EZQEDmp7piGMwjf1tEAyYQOeVRuDpPZTEEtX0FAmOg/AYUd/pHnOfR3M1As\nOIEeWubaylB9GiaVqmlt7eje7E7OH9ns1GvBCItBw9D+0xWgiBdZCzFLD5f/\nYfvru4eZaVYgEXROJgO8Ae+jt9YjQPrDYo56ADjXHJ1vXIA74lnzN0hY1SP9\nNVLQpHGxn3xCHD56ilc+E81LdVBsFj9jk+BvxzKaPFJ7VcLwd78moyVgnJzU\n9mPLPbB453ed+IqjranY2lR6Sk/UXQlN+iZfZKdP8tWMtSZfGUggM8VllAH8\n+30aaFlxjk+ZPZ2EsoT6sv3wrtDLFLrEiDEmGSrRrLA13sfFCEV6sVG86la3\nyn0Ahxur865sPevQh1XN2JtGDkr2zWpPm2984fRP+/c3pUR6KWgk7ZcS+eIz\nBJf1WDiugfs1+/yKU2guEWZLtCGm9aL4VWWw9+qifxYSMthP9WTlPe0+9hdX\n2auBJ6hSe4tmFKyQhOP46j8KeKFIaqSAIIUSsbwXFdT/e2WBdB/70IDPa7+p\nle8BsAVnVM4jZwEBvgZJ1UeG3bDG/9FS2oSBFpzgzw2M3yrqESKjo5ivN2/A\nuvxj\r\n=eGnm\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","module":"index.js","readme":"# @aofl/api-request\n\nA module for making api calls easier. Key features include caching responses and request/response formatters.\n\nCaching is implemented using @aofl/cache-manager and uses MemoryCache. @aofl/api-request caches the promises created by fetch api.\n\nRequest/response formatting referes to constructing a request payload and parsing the response payload. A formatter object should implement `pack()` and `unpack()` properties. `pack()` is to construct the request payload and `unpack()` is used to parse the response. Any number of formatters can be added to `apiRequestInstance` using the `addFromatter()` method. E.g. `GetFormatter`, `PostFormatter`, `CorsFormatter`, `FileUploadFormatter`, `GoogleMapsFormatter`, ....\n\n## Examples\n* [Basic Example](https://codesandbox.io/s/github/AgeOfLearning/aofl/tree/master/aofl-js-packages/api-request/examples/simple)\n\n\n## Installation\n```bash\nnpm i -S @aofl/api-request\n```\n\n## Usage\n```javascript\nimport {ApiRequest} from '@aofl/api-request';\n\nclass PostFormatter {\n  static pack(payload) {\n    const headers = new Headers();\n    const body = new FormData();\n    const boundary = 'Boundary-' + Date.now();\n\n    headers.append('Accept', '*/*');\n    headers.append('Content-Type', 'multipart/form-data; boundary=' + boundary);\n\n    if (typeof payload !== 'undefined') {\n      body.append('arguments', JSON.stringify(payload));\n    }\n\n    return {\n      method: 'POST',\n      headers,\n      body,\n      mode: 'cors',\n      credentails: 'include'\n    };\n  }\n\n  static unpack(response) {\n    return response.json()\n    .then((data) => {\n      if (data.status !== 'success') {\n        return Promise.reject(data);\n      }\n      return data;\n    });\n  }\n}\n\nconst apiRequestInstance = new ApiRequest();\napiRequestInstance.addFormatter('post', PostFormatter);\n\napiRequestInstance.request('https://example.org/', {}, 'post', true, 'sample-namespace')\n.then((jsonResponse) => {\n})\n.catch((jsonResponse) => {\n});\n```\n","browser":"dist/index.js","gitHead":"6009b3c38f31f159b65265ddbc3653c0087909be","scripts":{"docs":"jsdoc -c .jsdocrc.json .","test":"echo \"Error: no test specified\" && exit 1","build":"cross-env NODE_ENV=production aofl build","build:dev":"cross-env NODE_ENV=development aofl build","prepublishOnly":"npm run build && npm run docs"},"typings":"types.d.ts","_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"lerna/3.16.4/node@v10.16.3+x64 (darwin)","description":"A module for simplifying api calls","directories":{},"_nodeVersion":"10.16.3","_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jsdoc":"^3.6.3","@aofl/cli":"^3.0.0-beta.15","cross-env":"^6.0.3","tsd-jsdoc":"^2.4.0","jsdoc-babel":"^0.5.0","@aofl/cache-manager":"^3.0.0-beta.22"},"peerDependencies":{"@aofl/cache-manager":">= 3.0.0-beta.1 < 4.0.0"},"_npmOperationalInternal":{"tmp":"tmp/api-request_3.0.0-beta.22_1570768847471_0.6416528275346753","host":"s3://npm-registry-packages"}},"3.0.0-beta.23":{"name":"@aofl/api-request","version":"3.0.0-beta.23","keywords":["aofljs","@aofl/api-request","api request","api","cache response"],"author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/api-request@3.0.0-beta.23","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"contributors":[{"name":"Daniel Belisle","email":"daniel.belisle@aofl.com"},{"name":"Micah Blu","email":"micah.blu@aofl.com"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"c81af8b9d76cd41b9f4f168585bf4a998f7acf30","tarball":"https://registry.npmjs.org/@aofl/api-request/-/api-request-3.0.0-beta.23.tgz","fileCount":14,"integrity":"sha512-/FrYaUBqT/Sdhn97iPjSifiiT4H74DsPOW2v2vMWkqm2cpALklgM1t4xD8WhDtvlGqRE4ZCwBLIwzrU8HasgvA==","signatures":[{"sig":"MEUCICaYR7WcqSbpV4158Bn9h/lm5W54ORwkIFIyeCg0fnXaAiEA9YccdkMA4+AvN6QnhX06m6uGBxFzRRH8z/wIjP7QlS0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26960,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdoBWoCRA9TVsSAnZWagAA088QAJxI/+WPJvvQGlUab4gV\n7kh7tsLWNr4kj7ii6OvGqbE6EEHoRXKTChKd1nXlU30wbeLM5e3uz0w0Q2Dv\nfNU5dWfnR2oyio3jtU3U+BpR1E466IrLIdpqEW3HyyR2/GZ1cW+DdhzcecO7\nlEd8X/xPSmgKGIEx/FoBvXg+SvU+aXxR/EdUwxqreHYPdgrsLL/+tNxgm91p\nT3m6ZD4jAK4BW36pFTBJo8jX1a2dpeJ4wbsIFlqSmAPvhayZcXa9/BI1+QwY\n0ryeojq2yW86jv1eDdqJy7z3vgo7sg3RD/IOXiA/Oeo+AmHBZgK/57VMTHMa\n6nMiM5lGE5KpzpgLe2Y/UipOQxwK1d82JfuFFtczlryS45Pj454BkUsEsNId\n6oIDeuandRfayXbgomHgYxjNWbdUhaIqSRtPJI5kHNku1Sd7B+0E89ZZPPwK\nQfShUWKfHr8zLkWT1wQF1lQjpFX96i4ywsOGrlrKf4qLVJUL95pgHIsx7423\nMUNoenHcTi/c0GvOyX+oCfI1w9cHM71lkMq6HURVXb8TlsjZdfKlHsuUhBlL\nHF5bfUho4awhQ/guVRzbaAtoeKx7FnzzOvE3jDUPTZBx8kM5rf2uHha7oFPx\nBg5SKZmx4MT2uwhXR4fe4WmkrD5nlEXXpjC6M4jHaKkrHE4YfElRyjHBb8zx\nVfa4\r\n=xxoY\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","module":"index.js","readme":"# @aofl/api-request\n\nA module for making api calls easier. Key features include caching responses and request/response formatters.\n\nCaching is implemented using @aofl/cache-manager and uses MemoryCache. @aofl/api-request caches the promises created by fetch api.\n\nRequest/response formatting referes to constructing a request payload and parsing the response payload. A formatter object should implement `pack()` and `unpack()` properties. `pack()` is to construct the request payload and `unpack()` is used to parse the response. Any number of formatters can be added to `apiRequestInstance` using the `addFromatter()` method. E.g. `GetFormatter`, `PostFormatter`, `CorsFormatter`, `FileUploadFormatter`, `GoogleMapsFormatter`, ....\n\n## Examples\n* [Basic Example](https://codesandbox.io/s/github/AgeOfLearning/aofl/tree/master/aofl-js-packages/api-request/examples/simple)\n\n\n## Installation\n```bash\nnpm i -S @aofl/api-request\n```\n\n## Usage\n```javascript\nimport {ApiRequest} from '@aofl/api-request';\n\nclass PostFormatter {\n  static pack(payload) {\n    const headers = new Headers();\n    const body = new FormData();\n    const boundary = 'Boundary-' + Date.now();\n\n    headers.append('Accept', '*/*');\n    headers.append('Content-Type', 'multipart/form-data; boundary=' + boundary);\n\n    if (typeof payload !== 'undefined') {\n      body.append('arguments', JSON.stringify(payload));\n    }\n\n    return {\n      method: 'POST',\n      headers,\n      body,\n      mode: 'cors',\n      credentails: 'include'\n    };\n  }\n\n  static unpack(response) {\n    return response.json()\n    .then((data) => {\n      if (data.status !== 'success') {\n        return Promise.reject(data);\n      }\n      return data;\n    });\n  }\n}\n\nconst apiRequestInstance = new ApiRequest();\napiRequestInstance.addFormatter('post', PostFormatter);\n\napiRequestInstance.request('https://example.org/', {}, 'post', true, 'sample-namespace')\n.then((jsonResponse) => {\n})\n.catch((jsonResponse) => {\n});\n```\n","browser":"dist/index.js","gitHead":"35327a525c0190a3c1ee36be061e25eeab73ed33","scripts":{"docs":"jsdoc -c .jsdocrc.json .","test":"echo \"Error: no test specified\" && exit 1","build":"cross-env NODE_ENV=production aofl build","build:dev":"cross-env NODE_ENV=development aofl build","prepublishOnly":"npm run build && npm run docs"},"typings":"types.d.ts","_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"lerna/3.16.4/node@v10.16.3+x64 (darwin)","description":"A module for simplifying api calls","directories":{},"_nodeVersion":"10.16.3","_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jsdoc":"^3.6.3","@aofl/cli":"^3.0.0-beta.23","cross-env":"^6.0.3","tsd-jsdoc":"^2.4.0","jsdoc-babel":"^0.5.0","@aofl/cache-manager":"^3.0.0-beta.23"},"peerDependencies":{"@aofl/cache-manager":">= 3.0.0-beta.1 < 4.0.0"},"_npmOperationalInternal":{"tmp":"tmp/api-request_3.0.0-beta.23_1570772392309_0.3459120363751993","host":"s3://npm-registry-packages"}},"3.0.0-beta.24":{"name":"@aofl/api-request","version":"3.0.0-beta.24","keywords":["aofljs","@aofl/api-request","api request","api","cache response"],"author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/api-request@3.0.0-beta.24","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"contributors":[{"name":"Daniel Belisle","email":"daniel.belisle@aofl.com"},{"name":"Micah Blu","email":"micah.blu@aofl.com"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"7ad4761e173a52aca9c40c87bf0245482f19e975","tarball":"https://registry.npmjs.org/@aofl/api-request/-/api-request-3.0.0-beta.24.tgz","fileCount":14,"integrity":"sha512-DMoOJY/SaErSFZf6okDOIZJ0yKDouXve2uy+HCxxec/+zVLk30TsmjyQ7HyO1BOZNjEUVqTYHOgF4jyeHkZSdA==","signatures":[{"sig":"MEUCIAsT/rc2HhcZ6nOGtkEOLc1jLLEKNj/tJG7ZigiIAXoYAiEArtdBeqvUR10W5DKGJSa75UqRRVsnjodKnl3M7zNaOfM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26960,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdoCKDCRA9TVsSAnZWagAA6asP/11jjMQpRiTm/83IXppr\nKBXCo2eQQ0NgV+ebRmmBrtd2MKe8CWRpYAVLZxgH04AhxpqiNxD/BKEvWLT9\nVduzRUUmX84I29ELQKuBmRptpYz8cw0ULnuixOyynQtgp742Fi+haaXpBWAD\nl0Rs0QkUb4wRjj1z+29FmdNOWRPtLwegrXT0+Yok88kA/hYB5PwJhBAiA3nV\nrPrvNBrRfAOHilrtzMIY50iEeAw6QJb0Uy7gv104hgbBKVIMTKIMELMFRz5v\n8UVy3ilmH/6oqzvWIWyR4GNeyCPJbGAjezDSZZVNijgsCJ85WJUsaPg+AU3f\nvOtxq9Z55TcS0WymbvXfGktixToDMaMsOCyVmXCvKqrQSe6wWNy86AVgp54U\npDmDT6jh0t/Bk3WVFkfTMEdaCTqXcix4vKlh5qYtV3+pnMu8pz69GGcMgGi5\nUUVJaHnTHmSOdu4JkJcT7yL/nbe0Hrp9d/4HwLyaLOKMkyTMF4VdVWpDu4BP\ngJ4nlQ2uXBJQFHWVUoYW5AyjUnO1rA3iHUC8gKsaIQz2bUxJ2e7dW9i3sHmg\nBRVytiEaaYDKEv7BRQzCyuQqvlF2bMmhDdF7m1C7HUtDKFSwqnS++LtPY2Ge\nrG7s21J+JYQb8eqs8bSTQQWo+gbzBUKePGSz6qWKGtvHHySiEZ5t8C8RVXdQ\ndz1C\r\n=66IY\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","module":"index.js","readme":"# @aofl/api-request\n\nA module for making api calls easier. Key features include caching responses and request/response formatters.\n\nCaching is implemented using @aofl/cache-manager and uses MemoryCache. @aofl/api-request caches the promises created by fetch api.\n\nRequest/response formatting referes to constructing a request payload and parsing the response payload. A formatter object should implement `pack()` and `unpack()` properties. `pack()` is to construct the request payload and `unpack()` is used to parse the response. Any number of formatters can be added to `apiRequestInstance` using the `addFromatter()` method. E.g. `GetFormatter`, `PostFormatter`, `CorsFormatter`, `FileUploadFormatter`, `GoogleMapsFormatter`, ....\n\n## Examples\n* [Basic Example](https://codesandbox.io/s/github/AgeOfLearning/aofl/tree/master/aofl-js-packages/api-request/examples/simple)\n\n\n## Installation\n```bash\nnpm i -S @aofl/api-request\n```\n\n## Usage\n```javascript\nimport {ApiRequest} from '@aofl/api-request';\n\nclass PostFormatter {\n  static pack(payload) {\n    const headers = new Headers();\n    const body = new FormData();\n    const boundary = 'Boundary-' + Date.now();\n\n    headers.append('Accept', '*/*');\n    headers.append('Content-Type', 'multipart/form-data; boundary=' + boundary);\n\n    if (typeof payload !== 'undefined') {\n      body.append('arguments', JSON.stringify(payload));\n    }\n\n    return {\n      method: 'POST',\n      headers,\n      body,\n      mode: 'cors',\n      credentails: 'include'\n    };\n  }\n\n  static unpack(response) {\n    return response.json()\n    .then((data) => {\n      if (data.status !== 'success') {\n        return Promise.reject(data);\n      }\n      return data;\n    });\n  }\n}\n\nconst apiRequestInstance = new ApiRequest();\napiRequestInstance.addFormatter('post', PostFormatter);\n\napiRequestInstance.request('https://example.org/', {}, 'post', true, 'sample-namespace')\n.then((jsonResponse) => {\n})\n.catch((jsonResponse) => {\n});\n```\n","browser":"dist/index.js","gitHead":"be81016959caf66748582258c92f8c73471a9f67","scripts":{"docs":"jsdoc -c .jsdocrc.json .","test":"echo \"Error: no test specified\" && exit 1","build":"cross-env NODE_ENV=production aofl build","build:dev":"cross-env NODE_ENV=development aofl build","prepublishOnly":"npm run build && npm run docs"},"typings":"types.d.ts","_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"lerna/3.16.4/node@v10.16.3+x64 (darwin)","description":"A module for simplifying api calls","directories":{},"_nodeVersion":"10.16.3","_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jsdoc":"^3.6.3","@aofl/cli":"^3.0.0-beta.24","cross-env":"^6.0.3","tsd-jsdoc":"^2.4.0","jsdoc-babel":"^0.5.0","@aofl/cache-manager":"^3.0.0-beta.24"},"peerDependencies":{"@aofl/cache-manager":">= 3.0.0-beta.1 < 4.0.0"},"_npmOperationalInternal":{"tmp":"tmp/api-request_3.0.0-beta.24_1570775682851_0.5670134799880349","host":"s3://npm-registry-packages"}},"3.0.0-beta.25":{"name":"@aofl/api-request","version":"3.0.0-beta.25","keywords":["aofljs","@aofl/api-request","api request","api","cache response"],"author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/api-request@3.0.0-beta.25","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"contributors":[{"name":"Daniel Belisle","email":"daniel.belisle@aofl.com"},{"name":"Micah Blu","email":"micah.blu@aofl.com"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"8a7aeadbf931fbca992902768c9f9d3f1f43873d","tarball":"https://registry.npmjs.org/@aofl/api-request/-/api-request-3.0.0-beta.25.tgz","fileCount":14,"integrity":"sha512-KOBBRROgdhS0Ja/0mr5CbErat43d53ldbzFIItlpd1l3eirYyO/GJnlVuyJFNZ4dbFNGgcmKd8FnZQnr2eOI/A==","signatures":[{"sig":"MEUCIQDIDFhEjLeF/pL5XToY0uoMrOMrsaSppo8RBaqR/jFwRAIgWOlMw1/xxOoqijFzYa34sWCH/LNAt3g1uRRRCaPuKxo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26960,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdoDCWCRA9TVsSAnZWagAAR7MP/27BJ0H5oCV2ezgQH4B9\nDILxdpAepbEBNQxv1FYvwzC3Ay4h3rkYUT/q+Ravoq5/ajy7iQnSYBJVGfKB\nmvWqmu/rKiCRt5GnAKRy2Kz5HaV5mn6tFFa5kxJvxs7lKCFg2cyH86gy7UTH\ncXoky0pS7Bi3SHTrzv/WqesWEIME54YBiKYLxLlypXVidRISr3XLxI0gJd4J\nITRAOBWqj62LHngqRXQdxakpi2CWxyw2dgxzKkDnOPemgJbaEBR9i4ueOPzi\nFXfdZNEJsEBf6SMvyUBb2QcxVXdcGuwN7Q7jA1F7qnQKkgi3lf59bbx7oyz6\nbe7SKbOvCv8RwKGXfIDzU+OHcd5t0K9tY+5g4+UQYXJ5dZpFlSP8hxWSwNfV\nORnnrJ1MqG46DchQVCf9adbGt22+eiLiog8mx6E4oM6dS4O2Q9RqOKuvv8w0\nTMoCsm9X+w4g27y5hT5F5cEUiiUWq9iMDqz94kh6BNrpON3ZFyevt++eV9sO\nDA91YKB9Ha6D/86WGtZW5++mhd5nmlYBkbnzUnKjoCxPhnjjwsz22ktvGLyB\nyPKycaDAcmaNg6PrpI9JXW+s7nMQ6368RRh0ejh0eYhc9j/1L6d1xQ5HMfAu\nfBwHDe0F9Z811zQ9yR0AMCxd2grbgef3t3ENugSUYYSZdAnVpJGJFPqnhWfT\n4Qum\r\n=SiwJ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","module":"index.js","readme":"# @aofl/api-request\n\nA module for making api calls easier. Key features include caching responses and request/response formatters.\n\nCaching is implemented using @aofl/cache-manager and uses MemoryCache. @aofl/api-request caches the promises created by fetch api.\n\nRequest/response formatting referes to constructing a request payload and parsing the response payload. A formatter object should implement `pack()` and `unpack()` properties. `pack()` is to construct the request payload and `unpack()` is used to parse the response. Any number of formatters can be added to `apiRequestInstance` using the `addFromatter()` method. E.g. `GetFormatter`, `PostFormatter`, `CorsFormatter`, `FileUploadFormatter`, `GoogleMapsFormatter`, ....\n\n## Examples\n* [Basic Example](https://codesandbox.io/s/github/AgeOfLearning/aofl/tree/master/aofl-js-packages/api-request/examples/simple)\n\n\n## Installation\n```bash\nnpm i -S @aofl/api-request\n```\n\n## Usage\n```javascript\nimport {ApiRequest} from '@aofl/api-request';\n\nclass PostFormatter {\n  static pack(payload) {\n    const headers = new Headers();\n    const body = new FormData();\n    const boundary = 'Boundary-' + Date.now();\n\n    headers.append('Accept', '*/*');\n    headers.append('Content-Type', 'multipart/form-data; boundary=' + boundary);\n\n    if (typeof payload !== 'undefined') {\n      body.append('arguments', JSON.stringify(payload));\n    }\n\n    return {\n      method: 'POST',\n      headers,\n      body,\n      mode: 'cors',\n      credentails: 'include'\n    };\n  }\n\n  static unpack(response) {\n    return response.json()\n    .then((data) => {\n      if (data.status !== 'success') {\n        return Promise.reject(data);\n      }\n      return data;\n    });\n  }\n}\n\nconst apiRequestInstance = new ApiRequest();\napiRequestInstance.addFormatter('post', PostFormatter);\n\napiRequestInstance.request('https://example.org/', {}, 'post', true, 'sample-namespace')\n.then((jsonResponse) => {\n})\n.catch((jsonResponse) => {\n});\n```\n","browser":"dist/index.js","gitHead":"658a5f60a694ddcc2ddc62e8db80688cc6b71c68","scripts":{"docs":"jsdoc -c .jsdocrc.json .","test":"echo \"Error: no test specified\" && exit 1","build":"cross-env NODE_ENV=production aofl build","build:dev":"cross-env NODE_ENV=development aofl build","prepublishOnly":"npm run build && npm run docs"},"typings":"types.d.ts","_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"lerna/3.16.4/node@v10.16.3+x64 (darwin)","description":"A module for simplifying api calls","directories":{},"_nodeVersion":"10.16.3","_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jsdoc":"^3.6.3","@aofl/cli":"^3.0.0-beta.25","cross-env":"^6.0.3","tsd-jsdoc":"^2.4.0","jsdoc-babel":"^0.5.0","@aofl/cache-manager":"^3.0.0-beta.25"},"peerDependencies":{"@aofl/cache-manager":">= 3.0.0-beta.1 < 4.0.0"},"_npmOperationalInternal":{"tmp":"tmp/api-request_3.0.0-beta.25_1570779285799_0.9749637712392771","host":"s3://npm-registry-packages"}},"3.0.0-beta.26":{"name":"@aofl/api-request","version":"3.0.0-beta.26","keywords":["aofljs","@aofl/api-request","api request","api","cache response"],"author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/api-request@3.0.0-beta.26","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"contributors":[{"name":"Daniel Belisle","email":"daniel.belisle@aofl.com"},{"name":"Micah Blu","email":"micah.blu@aofl.com"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"7c68381d116a856d5e45253f922f784f91415ab2","tarball":"https://registry.npmjs.org/@aofl/api-request/-/api-request-3.0.0-beta.26.tgz","fileCount":14,"integrity":"sha512-F1wGcNKpzJHTBig0+QhgbfvSfTn9dlGs25NJrup0D6usM39bN9cmG4ytIPbk9+5sg40qTnibs6GUDCYvamKiFw==","signatures":[{"sig":"MEUCID7sRzvy8/EQh1ZPKgJVkdrjQ0+GNVKRMNBpRUBE7Vj0AiEApv4YyCY+vZLSIbba2qvFVKh5Igzw1RCotN98hiHBCxY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26960,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdoDPyCRA9TVsSAnZWagAA7VYP/2kWJRhBcjnb2z2C69gC\n+ugVKPVU2EQ361dpDulRRs375OXCT+f7X+IDLNKLSzDWqMwyI0inBoSfB5Jx\nqbuSKww8Tu7OPrq7CdvwDggLSpo+KZn3ib/zmLVOlmcQCPSXn1YEqyKtvjwp\ncPaPDGEVyULghxOJWpGW8t7HNEVHAf2BjHQ/GQQ7tjZ+4tc4LEFq1iVultx8\ncEmAVtan82kJdXCl3AfjwG9HnmFR9B+A6XwYyMIkgYkvKQoY7CY4+AQI4Xk5\nDScGHYCQnjBdjm01dTUiHWgsqeGZyUJ21TyLhrubc81HOYBjXkV2bFcFSk7+\nYOa2AhU7QPeHPXtel8J9b+jzZdlCN0xxgGM/plJzDJyCZKj451KmX6wizAgq\n1PT2/RYrCsq7u3xAKfDgzE8YxXIOeOJDHcpEdveYbsBdFYTD1nubR7iK+2nH\njePGiKVnXnLvnjk86Z6tCC4WjiOJ8LAk7CQF6JqPwXHKaT8xN/1wNGvPdeuc\n+1RxKNVm2JkciQ/jzALKHvXBW4SVrqdKKuZA3j3qK2/7bJAUcchUv/AkmdcK\n6jtS68TkHBoYF+T9ISAd+1/rgNKYzVPK+hNwCz841nwQEvAnOwgww988lrdq\nudwaRXzMRA+yDcHWlNpXGrJwJ3dkI4bFTLUzpCTrZY7uXDaoO+H1RbKfqfKg\n22lo\r\n=Bi27\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","module":"index.js","readme":"# @aofl/api-request\n\nA module for making api calls easier. Key features include caching responses and request/response formatters.\n\nCaching is implemented using @aofl/cache-manager and uses MemoryCache. @aofl/api-request caches the promises created by fetch api.\n\nRequest/response formatting referes to constructing a request payload and parsing the response payload. A formatter object should implement `pack()` and `unpack()` properties. `pack()` is to construct the request payload and `unpack()` is used to parse the response. Any number of formatters can be added to `apiRequestInstance` using the `addFromatter()` method. E.g. `GetFormatter`, `PostFormatter`, `CorsFormatter`, `FileUploadFormatter`, `GoogleMapsFormatter`, ....\n\n## Examples\n* [Basic Example](https://codesandbox.io/s/github/AgeOfLearning/aofl/tree/master/aofl-js-packages/api-request/examples/simple)\n\n\n## Installation\n```bash\nnpm i -S @aofl/api-request\n```\n\n## Usage\n```javascript\nimport {ApiRequest} from '@aofl/api-request';\n\nclass PostFormatter {\n  static pack(payload) {\n    const headers = new Headers();\n    const body = new FormData();\n    const boundary = 'Boundary-' + Date.now();\n\n    headers.append('Accept', '*/*');\n    headers.append('Content-Type', 'multipart/form-data; boundary=' + boundary);\n\n    if (typeof payload !== 'undefined') {\n      body.append('arguments', JSON.stringify(payload));\n    }\n\n    return {\n      method: 'POST',\n      headers,\n      body,\n      mode: 'cors',\n      credentails: 'include'\n    };\n  }\n\n  static unpack(response) {\n    return response.json()\n    .then((data) => {\n      if (data.status !== 'success') {\n        return Promise.reject(data);\n      }\n      return data;\n    });\n  }\n}\n\nconst apiRequestInstance = new ApiRequest();\napiRequestInstance.addFormatter('post', PostFormatter);\n\napiRequestInstance.request('https://example.org/', {}, 'post', true, 'sample-namespace')\n.then((jsonResponse) => {\n})\n.catch((jsonResponse) => {\n});\n```\n","browser":"dist/index.js","gitHead":"12fa62b6d27f95d1517f1ec4707c284b865a7081","scripts":{"docs":"jsdoc -c .jsdocrc.json .","test":"echo \"Error: no test specified\" && exit 1","build":"cross-env NODE_ENV=production aofl build","build:dev":"cross-env NODE_ENV=development aofl build","prepublishOnly":"npm run build && npm run docs"},"typings":"types.d.ts","_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"lerna/3.16.4/node@v10.16.3+x64 (darwin)","description":"A module for simplifying api calls","directories":{},"_nodeVersion":"10.16.3","_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jsdoc":"^3.6.3","@aofl/cli":"^3.0.0-beta.26","cross-env":"^6.0.3","tsd-jsdoc":"^2.4.0","jsdoc-babel":"^0.5.0","@aofl/cache-manager":"^3.0.0-beta.26"},"peerDependencies":{"@aofl/cache-manager":">= 3.0.0-beta.1 < 4.0.0"},"_npmOperationalInternal":{"tmp":"tmp/api-request_3.0.0-beta.26_1570780145651_0.38812628477015676","host":"s3://npm-registry-packages"}},"3.0.0-beta.27":{"name":"@aofl/api-request","version":"3.0.0-beta.27","keywords":["aofljs","@aofl/api-request","api request","api","cache response"],"author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/api-request@3.0.0-beta.27","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"contributors":[{"name":"Daniel Belisle","email":"daniel.belisle@aofl.com"},{"name":"Micah Blu","email":"micah.blu@aofl.com"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"6146a64409b28fdcbfc6365134eb1e2c60445242","tarball":"https://registry.npmjs.org/@aofl/api-request/-/api-request-3.0.0-beta.27.tgz","fileCount":14,"integrity":"sha512-w2+A7ovAVOAOCN+5ztjy29TcSvBOxI7U0tIKaU1zIoPsD6489QrqneRYjNcVzy7JbdG/gRfcx4q3lSBj/zBROw==","signatures":[{"sig":"MEYCIQDIqcutJj/xJyzIUkE2ix0D7PJ61BpRl3r1NldJ8AfiAgIhANG75oYaUtBNMc4euADym2ECPH2LDVInGchxalU0qFRO","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26960,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdoDUXCRA9TVsSAnZWagAAgt8P/RTtW/+OJxKqkQpNwRll\nJWM+/fkbcYsVKJA+R2PLSW+4zr70IVIQGSHHdT+KHImWw4SlqoBuHspyJbd5\nclpzU8ZiRNAcfmNXJ+T/rI0zBo97Bz9jFgARFZOL0QrE22t+fw44Tf5LwMOo\nNkxs4xX7SaLAhGx5/q/LYfY4JXnoE0ru5aqbRfsiIzF2BEEVtHV5GvUYKTDY\nHp5rBeJfSTCAznzrGHi7jl8K90DFe0DCh8hX66i8P1A04I4hG15rPU/WxCUx\n4b36hL/klT+wS6M4IDnB+i6vM7Qwnu4LRhupm+QmtHHNDw0k+UYKPYaWEc0K\nO/3kojIHsPaiSD1/0o/gvFzaL7OzkZ6Uay+l9LrbpTamMTJx9SUL+4YBBlem\nSPVUrIxUQibc8w4izNBiUS2DGc/8jio4YwGkoEBC0XD3GnD3gaQ3V3VLfX69\ncfouPR14k3dNNdDVS72xr5BJ3B10IGaoy7DcLqL4YmSC54+1lWxNFLbZvCCz\n5G6dgJER3Nr6z/H6UEfx2ooCoDC9R4chkBxHo8Z6FHqgplpw+xj/LGoyrfLI\nPw4NQ8sei+obG8Riuo43UCapwacPuQ3D3IMKu3Iv5MlfwJPV810fmPbjhYtZ\nbXzFWNQrfDZVttf0+yEoHbQZV7/LZDmlf6Wc71wdoOykUBdKkKj20BdJ1iCr\n4rZ3\r\n=ZpcW\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","module":"index.js","readme":"# @aofl/api-request\n\nA module for making api calls easier. Key features include caching responses and request/response formatters.\n\nCaching is implemented using @aofl/cache-manager and uses MemoryCache. @aofl/api-request caches the promises created by fetch api.\n\nRequest/response formatting referes to constructing a request payload and parsing the response payload. A formatter object should implement `pack()` and `unpack()` properties. `pack()` is to construct the request payload and `unpack()` is used to parse the response. Any number of formatters can be added to `apiRequestInstance` using the `addFromatter()` method. E.g. `GetFormatter`, `PostFormatter`, `CorsFormatter`, `FileUploadFormatter`, `GoogleMapsFormatter`, ....\n\n## Examples\n* [Basic Example](https://codesandbox.io/s/github/AgeOfLearning/aofl/tree/master/aofl-js-packages/api-request/examples/simple)\n\n\n## Installation\n```bash\nnpm i -S @aofl/api-request\n```\n\n## Usage\n```javascript\nimport {ApiRequest} from '@aofl/api-request';\n\nclass PostFormatter {\n  static pack(payload) {\n    const headers = new Headers();\n    const body = new FormData();\n    const boundary = 'Boundary-' + Date.now();\n\n    headers.append('Accept', '*/*');\n    headers.append('Content-Type', 'multipart/form-data; boundary=' + boundary);\n\n    if (typeof payload !== 'undefined') {\n      body.append('arguments', JSON.stringify(payload));\n    }\n\n    return {\n      method: 'POST',\n      headers,\n      body,\n      mode: 'cors',\n      credentails: 'include'\n    };\n  }\n\n  static unpack(response) {\n    return response.json()\n    .then((data) => {\n      if (data.status !== 'success') {\n        return Promise.reject(data);\n      }\n      return data;\n    });\n  }\n}\n\nconst apiRequestInstance = new ApiRequest();\napiRequestInstance.addFormatter('post', PostFormatter);\n\napiRequestInstance.request('https://example.org/', {}, 'post', true, 'sample-namespace')\n.then((jsonResponse) => {\n})\n.catch((jsonResponse) => {\n});\n```\n","browser":"dist/index.js","gitHead":"de2f0be87aaadfa43212214d4f491d68930b2495","scripts":{"docs":"jsdoc -c .jsdocrc.json .","test":"echo \"Error: no test specified\" && exit 1","build":"cross-env NODE_ENV=production aofl build","build:dev":"cross-env NODE_ENV=development aofl build","prepublishOnly":"npm run build && npm run docs"},"typings":"types.d.ts","_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"lerna/3.16.4/node@v10.16.3+x64 (darwin)","description":"A module for simplifying api calls","directories":{},"_nodeVersion":"10.16.3","_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jsdoc":"^3.6.3","@aofl/cli":"^3.0.0-beta.27","cross-env":"^6.0.3","tsd-jsdoc":"^2.4.0","jsdoc-babel":"^0.5.0","@aofl/cache-manager":"^3.0.0-beta.27"},"peerDependencies":{"@aofl/cache-manager":">= 3.0.0-beta.1 < 4.0.0"},"_npmOperationalInternal":{"tmp":"tmp/api-request_3.0.0-beta.27_1570780439238_0.9947405519444088","host":"s3://npm-registry-packages"}},"3.0.0-beta.28":{"name":"@aofl/api-request","version":"3.0.0-beta.28","keywords":["aofljs","@aofl/api-request","api request","api","cache response"],"author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/api-request@3.0.0-beta.28","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"contributors":[{"name":"Daniel Belisle","email":"daniel.belisle@aofl.com"},{"name":"Micah Blu","email":"micah.blu@aofl.com"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"d464aac6843f7d968357476e7894ea163d1eb3fb","tarball":"https://registry.npmjs.org/@aofl/api-request/-/api-request-3.0.0-beta.28.tgz","fileCount":14,"integrity":"sha512-WOK87CteCZq0styqnlFpHLqIc8Slt2Sfe68LOYV+OnyT+XSgadRrHkGwRlxb74v6b/ViUbQr7Owy8mEUAmirFw==","signatures":[{"sig":"MEUCIC05JTCvKUzCcpGaCcER6xkBHf3XP9U9HDeLoasj9UEIAiEAq+0nMO39a4zidu8Hc9/iUS6xtCTvmDfalLq+Dm4+4kU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26960,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdoDa9CRA9TVsSAnZWagAAJGgQAKK2DgjGLrPmCrzIFriJ\nbqnVI8C705s9YhQ0SeFfWV9XK2X87IqS095oQy+LFDIR5L8UINUAdLAVh8fw\nNNgAdXsHXk9XbcoBLMTK9bZLrtGVUYdB7IKjJPEv0StTLBC/yGU+t07Mqa+v\nHP1nQthqww8v7FI8961N507CIBFnsVR74jKkw1VYLNpL/F5iQo81+UJ26HtT\nILwrB5odClamm0VZ+YhHTBnH4uryujjNIWauMfZjI9ZaRocnzHMYt8C9AvWB\nUrddnqWowE5q+iuPzCcbTWcLqqPkVt2GWCpqamFGfLihPQZLmCDCCJkvG6qK\neRuRAVRfdUdcGFbNCdPVsrkuJcB52tBxwwdQLSffJxeSFGawFbuMxUpF6SNJ\nuHbhgidC8KTHR84x1ICDkk6s5Y+I4WSioXNc484XHL/UCpNcOztG+itPAZP6\nCOg1hi33AD1Kg6zo9Gt1ckU0dwWnBzlrprmPBeXruR0eLZU3mtyygP3Jvil6\nF9WeEP3ULfiaPY1CWoogZgyGR6rPgOelw0XaXZ3yE4Oxt9zLWDvmIK6poQ3q\nsZdCFxP/EoWb6Jueo52XRULxZCzQgXpfLDswlPxyuMnWpgkcCDkmXjE/V/3u\nJjOLtdvlaLzS63sRNR9vJaMH9zy+UOU8ZklIO3Ay6/0F0jdYlIXuw0A2V6+Q\nc4cy\r\n=i96K\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","module":"index.js","readme":"# @aofl/api-request\n\nA module for making api calls easier. Key features include caching responses and request/response formatters.\n\nCaching is implemented using @aofl/cache-manager and uses MemoryCache. @aofl/api-request caches the promises created by fetch api.\n\nRequest/response formatting referes to constructing a request payload and parsing the response payload. A formatter object should implement `pack()` and `unpack()` properties. `pack()` is to construct the request payload and `unpack()` is used to parse the response. Any number of formatters can be added to `apiRequestInstance` using the `addFromatter()` method. E.g. `GetFormatter`, `PostFormatter`, `CorsFormatter`, `FileUploadFormatter`, `GoogleMapsFormatter`, ....\n\n## Examples\n* [Basic Example](https://codesandbox.io/s/github/AgeOfLearning/aofl/tree/master/aofl-js-packages/api-request/examples/simple)\n\n\n## Installation\n```bash\nnpm i -S @aofl/api-request\n```\n\n## Usage\n```javascript\nimport {ApiRequest} from '@aofl/api-request';\n\nclass PostFormatter {\n  static pack(payload) {\n    const headers = new Headers();\n    const body = new FormData();\n    const boundary = 'Boundary-' + Date.now();\n\n    headers.append('Accept', '*/*');\n    headers.append('Content-Type', 'multipart/form-data; boundary=' + boundary);\n\n    if (typeof payload !== 'undefined') {\n      body.append('arguments', JSON.stringify(payload));\n    }\n\n    return {\n      method: 'POST',\n      headers,\n      body,\n      mode: 'cors',\n      credentails: 'include'\n    };\n  }\n\n  static unpack(response) {\n    return response.json()\n    .then((data) => {\n      if (data.status !== 'success') {\n        return Promise.reject(data);\n      }\n      return data;\n    });\n  }\n}\n\nconst apiRequestInstance = new ApiRequest();\napiRequestInstance.addFormatter('post', PostFormatter);\n\napiRequestInstance.request('https://example.org/', {}, 'post', true, 'sample-namespace')\n.then((jsonResponse) => {\n})\n.catch((jsonResponse) => {\n});\n```\n","browser":"dist/index.js","gitHead":"dbd14b0bd931ea76999d514d051dcd0a3ef6a8c0","scripts":{"docs":"jsdoc -c .jsdocrc.json .","test":"echo \"Error: no test specified\" && exit 1","build":"cross-env NODE_ENV=production aofl build","build:dev":"cross-env NODE_ENV=development aofl build","prepublishOnly":"npm run build && npm run docs"},"typings":"types.d.ts","_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"lerna/3.16.4/node@v10.16.3+x64 (darwin)","description":"A module for simplifying api calls","directories":{},"_nodeVersion":"10.16.3","_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jsdoc":"^3.6.3","@aofl/cli":"^3.0.0-beta.28","cross-env":"^6.0.3","tsd-jsdoc":"^2.4.0","jsdoc-babel":"^0.5.0","@aofl/cache-manager":"^3.0.0-beta.28"},"peerDependencies":{"@aofl/cache-manager":">= 3.0.0-beta.1 < 4.0.0"},"_npmOperationalInternal":{"tmp":"tmp/api-request_3.0.0-beta.28_1570780861117_0.5310101878259101","host":"s3://npm-registry-packages"}},"3.0.0-beta.30":{"name":"@aofl/api-request","version":"3.0.0-beta.30","keywords":["aofljs","@aofl/api-request","api request","api","cache response"],"author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/api-request@3.0.0-beta.30","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"contributors":[{"name":"Daniel Belisle","email":"daniel.belisle@aofl.com"},{"name":"Micah Blu","email":"micah.blu@aofl.com"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"440315b79ed4da20752483d7ea4d1a17a615d882","tarball":"https://registry.npmjs.org/@aofl/api-request/-/api-request-3.0.0-beta.30.tgz","fileCount":14,"integrity":"sha512-8Zc79a4zEfs8RmI8jqx0bcLv3y1RQOtD2TK2usgaZ6dC9AUrVRjaAOCkUg9W+AfHfMwPokx4tQqS/iXK+KHT0g==","signatures":[{"sig":"MEYCIQCFd/kfnzaHu/vXBfBviM7vhmHMC1Wo3Chpc8F3SR/kZQIhALnFPqFIUn+hu1Imi7VmPXTsw2TADBq8ho0SxOCMkRuE","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26297,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdoQkiCRA9TVsSAnZWagAAfIcQAIiOHfONCXeu5J2qNs+V\nvTyn3jeEBJBEtZfx93+DxZzVQXrubY5q7vJetYJ7LkEUnjoVW5yHYaP57JLA\nE6jTrDQAe908S4YiNd9KGRXv3rk1Pn/G9ozw8Fk59rdeWiSEU3P8/xNd8iaQ\nOYG8biunu1SbouKHnU68rDNPRfEQvWZ9w1D2yFCm1WUXjy5BXcfeYEVuNSIK\naD4AymbMdSZ2TooUGLCHAy+eXcX31fm6cZtyVgK9rnQkntxMmsluQZRLBeHs\nBQSDO8/FBK41iM27so3bq9HOcdu8dT8Frq55EzeoE1Nf7USdF6Mvq4401XBf\nWIuqO9+uAN8lEQM9pE5kjNFyIxjykMElI6LKXUQ+7wEc48aZQzrZsI/mAx0e\nJYMaZzfuljvM8TlzNVVjzHTpTQ22x2Zh3iO3QwL3pbGQLdaw2APxngIcCs4t\nz6a2AFYdMORK2yJKlOKJPWj/USwdp4qcieclFFfgjDbdEJcOKKRzSrVz85us\nAcwI8FaDlUeBv1SnYzplBMivUIzs0OMYvRZBrA/M7ZPGhWhHTCck5fq21tA1\n6ioq/cbPbsHE+HzIidirqKwutWq2zQvtuh4GIXVgAIBArgE1SJpu/+Ot3Shh\nr0WD3QTCBg9cNcZBbwHys27WOnnJ903GXxRBXyZTdAQG64H5sJRpVuM0rnq6\nRXhC\r\n=41u4\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","module":"index.js","readme":"# @aofl/api-request\n\nA module for making api calls easier. Key features include caching responses and request/response formatters.\n\nCaching is implemented using @aofl/cache-manager and uses MemoryCache. @aofl/api-request caches the promises created by fetch api.\n\nRequest/response formatting referes to constructing a request payload and parsing the response payload. A formatter object should implement `pack()` and `unpack()` properties. `pack()` is to construct the request payload and `unpack()` is used to parse the response. Any number of formatters can be added to `apiRequestInstance` using the `addFromatter()` method. E.g. `GetFormatter`, `PostFormatter`, `CorsFormatter`, `FileUploadFormatter`, `GoogleMapsFormatter`, ....\n\n## Examples\n* [Basic Example](https://codesandbox.io/s/github/AgeOfLearning/aofl/tree/master/aofl-js-packages/api-request/examples/simple)\n\n\n## Installation\n```bash\nnpm i -S @aofl/api-request\n```\n\n## Usage\n```javascript\nimport {ApiRequest} from '@aofl/api-request';\n\nclass PostFormatter {\n  static pack(payload) {\n    const headers = new Headers();\n    const body = new FormData();\n    const boundary = 'Boundary-' + Date.now();\n\n    headers.append('Accept', '*/*');\n    headers.append('Content-Type', 'multipart/form-data; boundary=' + boundary);\n\n    if (typeof payload !== 'undefined') {\n      body.append('arguments', JSON.stringify(payload));\n    }\n\n    return {\n      method: 'POST',\n      headers,\n      body,\n      mode: 'cors',\n      credentails: 'include'\n    };\n  }\n\n  static unpack(response) {\n    return response.json()\n    .then((data) => {\n      if (data.status !== 'success') {\n        return Promise.reject(data);\n      }\n      return data;\n    });\n  }\n}\n\nconst apiRequestInstance = new ApiRequest();\napiRequestInstance.addFormatter('post', PostFormatter);\n\napiRequestInstance.request('https://example.org/', {}, 'post', true, 'sample-namespace')\n.then((jsonResponse) => {\n})\n.catch((jsonResponse) => {\n});\n```\n","browser":"dist/index.js","gitHead":"7bb6b9b6e2c1d77cf7e65680aeb6a4c60e0300f4","scripts":{"docs":"jsdoc -c .jsdocrc.json .","test":"echo \"Error: no test specified\" && exit 1","build":"cross-env NODE_ENV=production aofl build","build:dev":"cross-env NODE_ENV=development aofl build","prepublishOnly":"npm run build && npm run docs"},"typings":"types.d.ts","_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"lerna/3.17.0/node@v10.16.0+x64 (darwin)","description":"A module for simplifying api calls","directories":{},"_nodeVersion":"10.16.0","_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jsdoc":"^3.6.3","@aofl/cli":"^3.0.0-beta.30","cross-env":"^6.0.3","tsd-jsdoc":"^2.4.0","jsdoc-babel":"^0.5.0","@aofl/cache-manager":"^3.0.0-beta.30"},"peerDependencies":{"@aofl/cache-manager":">= 3.0.0-beta.1 < 4.0.0"},"_npmOperationalInternal":{"tmp":"tmp/api-request_3.0.0-beta.30_1570834721974_0.7861989049348586","host":"s3://npm-registry-packages"}},"3.0.0-beta.32":{"name":"@aofl/api-request","version":"3.0.0-beta.32","keywords":["aofljs","@aofl/api-request","api request","api","cache response"],"author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/api-request@3.0.0-beta.32","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"contributors":[{"name":"Daniel Belisle","email":"daniel.belisle@aofl.com"},{"name":"Micah Blu","email":"micah.blu@aofl.com"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"dcce625441af0d8ab6e22c5ddb550b9e40a24edb","tarball":"https://registry.npmjs.org/@aofl/api-request/-/api-request-3.0.0-beta.32.tgz","fileCount":13,"integrity":"sha512-gNpeJW3oQedqqrk4fOc6nXraPAo60GtrTHzWOUypBBJEJSZWcCTIcKhLX3Nmwv7F7+tF7IEcb9pFFh3sQYf6ag==","signatures":[{"sig":"MEUCIETE72ELq6JlRmkZS9/niPH63coI2PSUcerh/k45LLZCAiEA369FMPN06M2+GKCpPYru/m0vTcC77ZHJ+SP7d8xtJNk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26968,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdo8kvCRA9TVsSAnZWagAAv9UP/RXpWDAerIixoAaT2DbQ\nIF4ijoOBgf8cRh8u4opBvtrQ5p7PjfqVGNq50M5CUvl2T0w5TPiayokhViqq\nS6oFkxVrZjA5aCrSTrhjcSSSVk8uroTx7OvB98+s9axKm0qYgeuBkNt0TraS\nK2SOuZY0jJbtx81LdUcCmZBdN3rys2NNNJNUOFzRR/OdbuY9vi4jV/IRZSZ6\nt6mSw2O4az2U8AnNUsozaXC6GEsXfGNm0hnvNfEIie+wZepAkSgsVp+6T0kY\n8yd/t/jfTe5hyqSN3jHTCugjFw3TRPvPXkD+AEL3QL0XpeDgKNf8BdHRvdAP\ntcLenSfOulVJV7jAGmsf6FkNweSWErf2Z8KE8hKxGjpC+Cv5T1peIPCWh/X+\nXIs2eX4bZK35G+S+x3+2bJb6ub7PiV5ZyTpC9Wsz70YI/PYIiNmF9PU7lZ1c\n8YdUd/GNFf61hSKJixEAm2YBk5VQpyfubfzCrXR5U6+y9tBHnZyIjVnQoM/x\neMqi/jKlPh40537tDe/MR89SFeDkCVdqt/OXTtGXPEU7oDwrjD0uloYyHu6D\nqdRFjzo5G5N8Op5w/IOe/itjSHSn0l1YHdEefzj3zwfmsjINviWup89TRONt\nTyCAmkMPItoVkTmq7v50y5pS8lZHqgJeg1eLmtg2HBCBpp+P2/0aS7Qy9qgU\nNTTv\r\n=GU9X\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","module":"index.js","readme":"# @aofl/api-request\n\nA module for making api calls easier. Key features include caching responses and request/response formatters.\n\nCaching is implemented using @aofl/cache-manager and uses MemoryCache. @aofl/api-request caches the promises created by fetch api.\n\nRequest/response formatting referes to constructing a request payload and parsing the response payload. A formatter object should implement `pack()` and `unpack()` properties. `pack()` is to construct the request payload and `unpack()` is used to parse the response. Any number of formatters can be added to `apiRequestInstance` using the `addFromatter()` method. E.g. `GetFormatter`, `PostFormatter`, `CorsFormatter`, `FileUploadFormatter`, `GoogleMapsFormatter`, ....\n\n## Examples\n* [Basic Example](https://codesandbox.io/s/github/AgeOfLearning/aofl/tree/master/aofl-js-packages/api-request/examples/simple)\n\n\n## Installation\n```bash\nnpm i -S @aofl/api-request\n```\n\n## Usage\n```javascript\nimport {ApiRequest} from '@aofl/api-request';\n\nclass PostFormatter {\n  static pack(payload) {\n    const headers = new Headers();\n    const body = new FormData();\n    const boundary = 'Boundary-' + Date.now();\n\n    headers.append('Accept', '*/*');\n    headers.append('Content-Type', 'multipart/form-data; boundary=' + boundary);\n\n    if (typeof payload !== 'undefined') {\n      body.append('arguments', JSON.stringify(payload));\n    }\n\n    return {\n      method: 'POST',\n      headers,\n      body,\n      mode: 'cors',\n      credentails: 'include'\n    };\n  }\n\n  static unpack(response) {\n    return response.json()\n    .then((data) => {\n      if (data.status !== 'success') {\n        return Promise.reject(data);\n      }\n      return data;\n    });\n  }\n}\n\nconst apiRequestInstance = new ApiRequest();\napiRequestInstance.addFormatter('post', PostFormatter);\n\napiRequestInstance.request('https://example.org/', {}, 'post', true, 'sample-namespace')\n.then((jsonResponse) => {\n})\n.catch((jsonResponse) => {\n});\n```\n","browser":"dist/index.js","scripts":{"docs":"jsdoc -c .jsdocrc.json .","test":"echo \"Error: no test specified\" && exit 1","build":"cross-env NODE_ENV=production aofl build","build:dev":"cross-env NODE_ENV=development aofl build","prepublishOnly":"npm run build && npm run docs"},"typings":"types.d.ts","_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"6.11.3","description":"A module for simplifying api calls","directories":{},"_nodeVersion":"10.16.3","_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jsdoc":"^3.6.3","@aofl/cli":"^3.0.0-beta.32","cross-env":"^6.0.3","tsd-jsdoc":"^2.4.0","jsdoc-babel":"^0.5.0","@aofl/cache-manager":"^3.0.0-beta.32"},"peerDependencies":{"@aofl/cache-manager":">= 3.0.0-beta.1 < 4.0.0"},"_npmOperationalInternal":{"tmp":"tmp/api-request_3.0.0-beta.32_1571014958444_0.8177657570555383","host":"s3://npm-registry-packages"}},"3.0.0-beta.35":{"name":"@aofl/api-request","version":"3.0.0-beta.35","keywords":["aofljs","@aofl/api-request","api request","api","cache response"],"author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/api-request@3.0.0-beta.35","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"contributors":[{"name":"Daniel Belisle","email":"daniel.belisle@aofl.com"},{"name":"Micah Blu","email":"micah.blu@aofl.com"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"e7e012fc70697a70aef65e097f0b3afabd10dd83","tarball":"https://registry.npmjs.org/@aofl/api-request/-/api-request-3.0.0-beta.35.tgz","fileCount":14,"integrity":"sha512-dcsHsG6Kh6+m+7SqoAK1iLAKkpGmeTWb1RWzvCHFNDYM5ZT2wqyDCpZwrOlIQ43kpyhb41RHUHUE0p6Rm7/gww==","signatures":[{"sig":"MEUCIQCY7emaSaIUsgsR94VVCmkdzNLpK5KM4TuazN9wGoEZDwIgUaKE1VoN3ukQUI1zKsFoRrLnS3aSWwwEXgUPlzZUfgE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":28106,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdqWK+CRA9TVsSAnZWagAAhPMQAIiwpSri2rnSAKtk254J\n3X8wEyrazuKufhLaF5b9gwgwfhD+0YUI+QcGTz8DvjrFzfhOrfzFY0k6FZAX\nHjzp3JbsiuN5bwTM3znVxDrXu8D3o+I0RKwbGc2SChjEIWlIP+CWa7u14AHh\nmqrbLnEXOpCVhskQwpxVcszgreh6vQI+OsSu1+tUqv3TUD/bfq3D/4A5hshc\nBj8whnzacYkJ6o48ergSZBxy7z+PbWhw9i0IrBulk5Vrhyxdxb/+FJt9w95j\nSKE1f4FZHf333LowRNDokMd8rMmmjElN4XzX8c4SagBdHVA6+8IikS/PONki\nnEFhIDOCyjVNzfc0n1U2gXoYZmKefHoJmKNqxLP74God0WZx9GyC8BjBP49R\naH6XdbMoQxjvlWCKFWIuP65onxgNLSWRuqhaEx/H0cLXCHVs3k0GfT4JI6Bk\n6cmvT9unD+Cz78bmCKSgpKddOoUEV3VbaCqGNZwK9x0oxIY8jgojXECXoLDq\nbO7JxRMfyx6K8NZ2DpKpDJkjBHnXuyHfrhy0mB3Ti/Kw5f5ulTPijtzKZFjX\nhKG8U/4quU1j1XcS/bWBhTAJY6WIAO6EHqAQiGck0M8x/4xixssRQY7u2Lre\neqojkE7k9RnaqM2PYW4au9OWyVmIrH+jgiMED/FABJK+grH5kFmEhLZje1Ki\nQpNA\r\n=2vKc\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","module":"index.js","readme":"# @aofl/api-request\n\nA module for making api calls easier. Key features include caching responses and request/response formatters.\n\nCaching is implemented using @aofl/cache-manager and uses MemoryCache. @aofl/api-request caches the promises created by fetch api.\n\nRequest/response formatting referes to constructing a request payload and parsing the response payload. A formatter object should implement `pack()` and `unpack()` properties. `pack()` is to construct the request payload and `unpack()` is used to parse the response. Any number of formatters can be added to `apiRequestInstance` using the `addFromatter()` method. E.g. `GetFormatter`, `PostFormatter`, `CorsFormatter`, `FileUploadFormatter`, `GoogleMapsFormatter`, ....\n\n## Examples\n* [Basic Example](https://codesandbox.io/s/github/AgeOfLearning/aofl/tree/master/aofl-js-packages/api-request/examples/simple)\n\n\n## Installation\n```bash\nnpm i -S @aofl/api-request\n```\n\n## Usage\n```javascript\nimport {ApiRequest} from '@aofl/api-request';\n\nclass PostFormatter {\n  static pack(payload) {\n    const headers = new Headers();\n    const body = new FormData();\n    const boundary = 'Boundary-' + Date.now();\n\n    headers.append('Accept', '*/*');\n    headers.append('Content-Type', 'multipart/form-data; boundary=' + boundary);\n\n    if (typeof payload !== 'undefined') {\n      body.append('arguments', JSON.stringify(payload));\n    }\n\n    return {\n      method: 'POST',\n      headers,\n      body,\n      mode: 'cors',\n      credentails: 'include'\n    };\n  }\n\n  static unpack(response) {\n    return response.json()\n    .then((data) => {\n      if (data.status !== 'success') {\n        return Promise.reject(data);\n      }\n      return data;\n    });\n  }\n}\n\nconst apiRequestInstance = new ApiRequest();\napiRequestInstance.addFormatter('post', PostFormatter);\n\napiRequestInstance.request('https://example.org/', {}, 'post', true, 'sample-namespace')\n.then((jsonResponse) => {\n})\n.catch((jsonResponse) => {\n});\n```\n","browser":"dist/index.js","gitHead":"6506e91bedeb6cd9a30c22f437603e14e02a3ca3","scripts":{"docs":"jsdoc -c .jsdocrc.json .","test":"echo \"Error: no test specified\" && exit 1","build":"cross-env NODE_ENV=production aofl build","build:dev":"cross-env NODE_ENV=development aofl build","prepublishOnly":"npm run build && npm run docs"},"typings":"types.d.ts","_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"lerna/3.18.1/node@v10.16.3+x64 (darwin)","description":"A module for simplifying api calls","directories":{},"_nodeVersion":"10.16.3","_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jsdoc":"^3.6.3","@aofl/cli":"^3.0.0-beta.35","cross-env":"^6.0.3","tsd-jsdoc":"^2.4.0","jsdoc-babel":"^0.5.0","@aofl/cache-manager":"^3.0.0-beta.35"},"peerDependencies":{"@aofl/cache-manager":">= 3.0.0-beta.1 < 4.0.0"},"_npmOperationalInternal":{"tmp":"tmp/api-request_3.0.0-beta.35_1571381949955_0.8372725210626637","host":"s3://npm-registry-packages"}},"3.0.0-beta.36":{"name":"@aofl/api-request","version":"3.0.0-beta.36","keywords":["aofljs","@aofl/api-request","api request","api","cache response"],"author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/api-request@3.0.0-beta.36","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"contributors":[{"name":"Daniel Belisle","email":"daniel.belisle@aofl.com"},{"name":"Micah Blu","email":"micah.blu@aofl.com"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"900209e71865a3f3392852ca8eab02abfe8b8a53","tarball":"https://registry.npmjs.org/@aofl/api-request/-/api-request-3.0.0-beta.36.tgz","fileCount":14,"integrity":"sha512-hQmNONBeOJ7Sg9Fx28PegfCQs2/E5h2Ec+Zwnf9AH6Q76M1JDdflUccKRLrGsHItBrAvbJ7zNxrRsZ+hC4XBTw==","signatures":[{"sig":"MEUCIQDKpBuo6lyudF2S8WcPixuwX1eH9OlbX9e3LDrry8u0xgIgbwngcdnolVWlEHKCKBSI3/rfT10pi8UDueuVPIH3L7o=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":28106,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdqulfCRA9TVsSAnZWagAAoLMP/1yY602UeBOOJZNhx9nn\nEKg8hhJeRUu7mxBcczMjUa/E3Y31OlV2Lh0KP9hEj5T+JlvgDsy8Qj8AbWaC\nFvOQAbxMeLGiu8z1JmyJA0U/w0Vpp2ddwJkaOa7zIHmep/kNFEQjlS0l73Od\n6uXK2LplGwmHgVsKH7UjVFex04taEptpZL1RE8nI3vJuRJJ3kMGedNTcUZxp\n/tcrUl8FaGG/lDaP9gty1aL1Q4RMMXQpTnagYzqNMzloADV8Gowii+0bFysN\nw+bH3drjigMeWjr+pmcQc45Gpf2t3FYIvt2Pd2grSD3I1b0zN8DC9I3d2vAB\n3XxUMrujVrL7S8caA016fA+hiNVaTU4JmS32SVHaKLOg5oK5ZnpjlwDFvWbk\nCiP7D5CuA5ISzmOqP9W6s2Auupc7rjhe4q54NdNkKovWXK/ReVm04oOqQ9mP\n92zhtlf4fzEzszjO+zeZTOF8scFbNZZVnS65rznh16lS6ik4VbOvpGb3EAgk\nZu/qQR4XKenarxXFiX1nIOsNpfRXogVDBEZpMILPyhwm6ItijBQ0YegzNU7h\n18TG6ZceaRJNhSHlYgIrSwqv4CpdiAgUDD9Jlx/k+oow+/1ae6dzeCy+6BNP\nWDjS2qdhEzrxdbu+6q/JZIPOEeU7EU3OjrWg/JzCfPFt8I+qdFAt3Q+dTT2t\n2sZu\r\n=igVr\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","module":"index.js","readme":"# @aofl/api-request\n\nA module for making api calls easier. Key features include caching responses and request/response formatters.\n\nCaching is implemented using @aofl/cache-manager and uses MemoryCache. @aofl/api-request caches the promises created by fetch api.\n\nRequest/response formatting referes to constructing a request payload and parsing the response payload. A formatter object should implement `pack()` and `unpack()` properties. `pack()` is to construct the request payload and `unpack()` is used to parse the response. Any number of formatters can be added to `apiRequestInstance` using the `addFromatter()` method. E.g. `GetFormatter`, `PostFormatter`, `CorsFormatter`, `FileUploadFormatter`, `GoogleMapsFormatter`, ....\n\n## Examples\n* [Basic Example](https://codesandbox.io/s/github/AgeOfLearning/aofl/tree/master/aofl-js-packages/api-request/examples/simple)\n\n\n## Installation\n```bash\nnpm i -S @aofl/api-request\n```\n\n## Usage\n```javascript\nimport {ApiRequest} from '@aofl/api-request';\n\nclass PostFormatter {\n  static pack(payload) {\n    const headers = new Headers();\n    const body = new FormData();\n    const boundary = 'Boundary-' + Date.now();\n\n    headers.append('Accept', '*/*');\n    headers.append('Content-Type', 'multipart/form-data; boundary=' + boundary);\n\n    if (typeof payload !== 'undefined') {\n      body.append('arguments', JSON.stringify(payload));\n    }\n\n    return {\n      method: 'POST',\n      headers,\n      body,\n      mode: 'cors',\n      credentails: 'include'\n    };\n  }\n\n  static unpack(response) {\n    return response.json()\n    .then((data) => {\n      if (data.status !== 'success') {\n        return Promise.reject(data);\n      }\n      return data;\n    });\n  }\n}\n\nconst apiRequestInstance = new ApiRequest();\napiRequestInstance.addFormatter('post', PostFormatter);\n\napiRequestInstance.request('https://example.org/', {}, 'post', true, 'sample-namespace')\n.then((jsonResponse) => {\n})\n.catch((jsonResponse) => {\n});\n```\n","browser":"dist/index.js","gitHead":"9eae9fc87437b61f0019ffedccbc3df7c8e02a78","scripts":{"docs":"jsdoc -c .jsdocrc.json .","test":"echo \"Error: no test specified\" && exit 1","build":"cross-env NODE_ENV=production aofl build","build:dev":"cross-env NODE_ENV=development aofl build","prepublishOnly":"npm run build && npm run docs"},"typings":"types.d.ts","_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"lerna/3.18.1/node@v10.16.3+x64 (darwin)","description":"A module for simplifying api calls","directories":{},"_nodeVersion":"10.16.3","_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jsdoc":"^3.6.3","@aofl/cli":"^3.0.0-beta.36","cross-env":"^6.0.3","tsd-jsdoc":"^2.4.0","jsdoc-babel":"^0.5.0","@aofl/cache-manager":"^3.0.0-beta.36"},"peerDependencies":{"@aofl/cache-manager":">= 3.0.0-beta.1 < 4.0.0"},"_npmOperationalInternal":{"tmp":"tmp/api-request_3.0.0-beta.36_1571481951106_0.7361876186392564","host":"s3://npm-registry-packages"}},"3.0.0-beta.37":{"name":"@aofl/api-request","version":"3.0.0-beta.37","keywords":["aofljs","@aofl/api-request","api request","api","cache response"],"author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/api-request@3.0.0-beta.37","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"contributors":[{"name":"Daniel Belisle","email":"daniel.belisle@aofl.com"},{"name":"Micah Blu","email":"micah.blu@aofl.com"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"53d0e338b09cbfada4e4107b313d34b580af0735","tarball":"https://registry.npmjs.org/@aofl/api-request/-/api-request-3.0.0-beta.37.tgz","fileCount":14,"integrity":"sha512-+3mWtWcMJGWrMzIDT9xn15xbAa54PaNLKpOJOwBiqmr/CmwyFjOoBxw7BrSyaJSLjbM2J8z7+3LHKvVPnFXTPQ==","signatures":[{"sig":"MEUCIQCz/1M8Qaz8HwfyOY9ONLsHssp2DN6E2oJ+4U7XwSsnnwIgX8rNy5Tvjz0ViunjXHuawo4er91d6Tn6nxMABVRjBuI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":28106,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdsT+6CRA9TVsSAnZWagAAV+8QAIBI6H8KHSO1raNmqIck\neOZt8dkCl4ZBUIUlyRqRE3d+v78s67PCU8I53FzZ67HrEN3qxemXLrQiTBSl\n7fqUUTxP+Ssq6Dt0MOuh0Oa9vUt8oiFXQAdc87D0TaSbwY0nsWr1mpQ2Q5R1\nPzCiB1cZySAv5GYPSeGWsJD++CdKM9cm5Lx/yUTmwI5fRxDjY5++GEng+Dla\n6MThe8TZY6F87qHbogIwf9BFOGIx4QTZwMfKE2FyXLCwhgrMIYSNa4um1RQQ\ns2iP8ZaqlumxgI/Blb2XGw+PBCi+WA6oPAvsd5NECvzEgTQObV0ZhEpQ76PS\nSJuoHL34KBrkbOflblHYUmpWT3jWwvH5s68tf99NMorlb7R2gL8Op1Fx0/FZ\nb2QXjSLnPiDpRdym69uCZxHSSQaC1yvbGE7Rsl4PF99APOyMPIhyEUUkH3BO\npejFifTCOg1yEC1pK7am7LxehasBHoZ+Jy/mvWp1h1/gAjJOEmPRP32YllG9\nmYq1yIznqf+7H/wNchodCcMkPFIsxQWTLeAwIJY5RkK/Ipv7HEnO8TDEcUgN\nMGw5XwDX3s6y9VhLcWcGRb/o78gioH/7hqEqYqXE2iyPE95cE5okd28+tVee\noE5Tewd2kkkk+KW6XbiBfyfjqeQndH0L4rbSZq+/bmqtXww3NmWpSzxj/Tbm\ntImd\r\n=0T8B\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","module":"index.js","readme":"# @aofl/api-request\n\nA module for making api calls easier. Key features include caching responses and request/response formatters.\n\nCaching is implemented using @aofl/cache-manager and uses MemoryCache. @aofl/api-request caches the promises created by fetch api.\n\nRequest/response formatting referes to constructing a request payload and parsing the response payload. A formatter object should implement `pack()` and `unpack()` properties. `pack()` is to construct the request payload and `unpack()` is used to parse the response. Any number of formatters can be added to `apiRequestInstance` using the `addFromatter()` method. E.g. `GetFormatter`, `PostFormatter`, `CorsFormatter`, `FileUploadFormatter`, `GoogleMapsFormatter`, ....\n\n## Examples\n* [Basic Example](https://codesandbox.io/s/github/AgeOfLearning/aofl/tree/master/aofl-js-packages/api-request/examples/simple)\n\n\n## Installation\n```bash\nnpm i -S @aofl/api-request\n```\n\n## Usage\n```javascript\nimport {ApiRequest} from '@aofl/api-request';\n\nclass PostFormatter {\n  static pack(payload) {\n    const headers = new Headers();\n    const body = new FormData();\n    const boundary = 'Boundary-' + Date.now();\n\n    headers.append('Accept', '*/*');\n    headers.append('Content-Type', 'multipart/form-data; boundary=' + boundary);\n\n    if (typeof payload !== 'undefined') {\n      body.append('arguments', JSON.stringify(payload));\n    }\n\n    return {\n      method: 'POST',\n      headers,\n      body,\n      mode: 'cors',\n      credentails: 'include'\n    };\n  }\n\n  static unpack(response) {\n    return response.json()\n    .then((data) => {\n      if (data.status !== 'success') {\n        return Promise.reject(data);\n      }\n      return data;\n    });\n  }\n}\n\nconst apiRequestInstance = new ApiRequest();\napiRequestInstance.addFormatter('post', PostFormatter);\n\napiRequestInstance.request('https://example.org/', {}, 'post', true, 'sample-namespace')\n.then((jsonResponse) => {\n})\n.catch((jsonResponse) => {\n});\n```\n","browser":"dist/index.js","gitHead":"90abdfa3f72b91bd0c98e09afbd59c21621fe846","scripts":{"docs":"jsdoc -c .jsdocrc.json .","test":"echo \"Error: no test specified\" && exit 1","build":"cross-env NODE_ENV=production aofl build","build:dev":"cross-env NODE_ENV=development aofl build","prepublishOnly":"npm run build && npm run docs"},"typings":"types.d.ts","_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"lerna/3.17.0/node@v10.16.0+x64 (darwin)","description":"A module for simplifying api calls","directories":{},"_nodeVersion":"10.16.0","_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jsdoc":"^3.6.3","@aofl/cli":"^3.0.0-beta.37","cross-env":"^6.0.3","tsd-jsdoc":"^2.4.0","jsdoc-babel":"^0.5.0","@aofl/cache-manager":"^3.0.0-beta.37"},"peerDependencies":{"@aofl/cache-manager":">= 3.0.0-beta.1 < 4.0.0"},"_npmOperationalInternal":{"tmp":"tmp/api-request_3.0.0-beta.37_1571897274142_0.045711728040578326","host":"s3://npm-registry-packages"}},"3.0.0-beta.38":{"name":"@aofl/api-request","version":"3.0.0-beta.38","keywords":["aofljs","@aofl/api-request","api request","api","cache response"],"author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/api-request@3.0.0-beta.38","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"contributors":[{"name":"Daniel Belisle","email":"daniel.belisle@aofl.com"},{"name":"Micah Blu","email":"micah.blu@aofl.com"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"9c0a47febc7c6c13dda462ea5cc572b67f52513f","tarball":"https://registry.npmjs.org/@aofl/api-request/-/api-request-3.0.0-beta.38.tgz","fileCount":14,"integrity":"sha512-gQaLlffTPv+GnJhuElE7DkVAET4q3t+2J17OQeWiFyrwxKy0CszpPU7Hqbml/gSyAe8PtQO2AHrPt8TwYVZPIA==","signatures":[{"sig":"MEMCH0h2ZyLIaoP2kdRA5BfBd3piqnL4Q1lid7x/USOhmDQCIEhpocejX2OkntKmIHwuTQR7B/Ki+e1jkxhsFKY3RXMY","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":28106,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJduhQnCRA9TVsSAnZWagAAd/QP/A8fIeqCbvHUyCZjK1c6\nmGeab/96PNVmGe2pijwerimgiqVzn9d96QJej9WCoFf6jQtO/PT5+xlp/jXY\nIGOTcmbdIzCXeqCohQzP8ogFE/3iYRSF5z0xzO17WVoZ+Iyp4xudaQe4tHdg\ngyicMp8ToOuVR6jbFrMS2hXPIaMonXg/P7kUUV74fIqHKV/nsFT3UZr+wFkf\nLqwad3D5epZ4Tz8I/clNjw5/OWNkirLvnSmqbXvEHk1aAz4UWXsm3CLIUHTS\n9qR4pEnhFdWJAaXI5/Mz0nyr2VRAd0bThc3OLhBglrjIvRhNvMLsXK3a4upf\nIf+Qj2yeW9xUurnArddrxg5CM8ahQdr1lLRddsFczg+zoTf+ibATOlh+oiRe\nY6UlBZ+sOHZgtL/h5TgAktf2W65z++AtJB73/Un4YBtMiEieEpU15pMd6JEr\nxI749GOx/OlWQiVJHoUr9nT58MUjY6YGanerr+Ep+DxgByeSGmkCgE/qZ8qp\nboViUCN1aMfLlOQNG+cRZoq04AsllDSaRi6MvbJ8oWeKEs32KFp98CVvlqAS\noxlVGCd2wyEP1VHP2p31GKUklExWmj1aPUjxnc5I8dMeaX4H+CED/f4HbzoA\n2KPswtILc3LuSLrxM0vIljMMemJFT3acZ/UmiCMeQHuxmusiTWbIAgYDBe7j\nVNb2\r\n=Pao7\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","module":"index.js","readme":"# @aofl/api-request\n\nA module for making api calls easier. Key features include caching responses and request/response formatters.\n\nCaching is implemented using @aofl/cache-manager and uses MemoryCache. @aofl/api-request caches the promises created by fetch api.\n\nRequest/response formatting referes to constructing a request payload and parsing the response payload. A formatter object should implement `pack()` and `unpack()` properties. `pack()` is to construct the request payload and `unpack()` is used to parse the response. Any number of formatters can be added to `apiRequestInstance` using the `addFromatter()` method. E.g. `GetFormatter`, `PostFormatter`, `CorsFormatter`, `FileUploadFormatter`, `GoogleMapsFormatter`, ....\n\n## Examples\n* [Basic Example](https://codesandbox.io/s/github/AgeOfLearning/aofl/tree/master/aofl-js-packages/api-request/examples/simple)\n\n\n## Installation\n```bash\nnpm i -S @aofl/api-request\n```\n\n## Usage\n```javascript\nimport {ApiRequest} from '@aofl/api-request';\n\nclass PostFormatter {\n  static pack(payload) {\n    const headers = new Headers();\n    const body = new FormData();\n    const boundary = 'Boundary-' + Date.now();\n\n    headers.append('Accept', '*/*');\n    headers.append('Content-Type', 'multipart/form-data; boundary=' + boundary);\n\n    if (typeof payload !== 'undefined') {\n      body.append('arguments', JSON.stringify(payload));\n    }\n\n    return {\n      method: 'POST',\n      headers,\n      body,\n      mode: 'cors',\n      credentails: 'include'\n    };\n  }\n\n  static unpack(response) {\n    return response.json()\n    .then((data) => {\n      if (data.status !== 'success') {\n        return Promise.reject(data);\n      }\n      return data;\n    });\n  }\n}\n\nconst apiRequestInstance = new ApiRequest();\napiRequestInstance.addFormatter('post', PostFormatter);\n\napiRequestInstance.request('https://example.org/', {}, 'post', true, 'sample-namespace')\n.then((jsonResponse) => {\n})\n.catch((jsonResponse) => {\n});\n```\n","browser":"dist/index.js","gitHead":"9fff03a99453d439b551d48a69e5d642b9957854","scripts":{"docs":"jsdoc -c .jsdocrc.json .","test":"echo \"Error: no test specified\" && exit 1","build":"cross-env NODE_ENV=production aofl build","build:dev":"cross-env NODE_ENV=development aofl build","prepublishOnly":"npm run build && npm run docs"},"typings":"types.d.ts","_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"lerna/3.17.0/node@v10.16.0+x64 (darwin)","description":"A module for simplifying api calls","directories":{},"_nodeVersion":"10.16.0","_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jsdoc":"^3.6.3","@aofl/cli":"^3.0.0-beta.38","cross-env":"^6.0.3","tsd-jsdoc":"^2.4.0","jsdoc-babel":"^0.5.0","@aofl/cache-manager":"^3.0.0-beta.38"},"peerDependencies":{"@aofl/cache-manager":">= 3.0.0-beta.1 < 4.0.0"},"_npmOperationalInternal":{"tmp":"tmp/api-request_3.0.0-beta.38_1572475943067_0.993886363815228","host":"s3://npm-registry-packages"}},"3.0.0-alpha.12":{"name":"@aofl/api-request","version":"3.0.0-alpha.12","keywords":["aofljs","@aofl/api-request","api request","api","cache response"],"author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/api-request@3.0.0-alpha.12","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"contributors":[{"name":"Daniel Belisle","email":"daniel.belisle@aofl.com"},{"name":"Micah Blu","email":"micah.blu@aofl.com"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"086995b9e6a2436c653cc1a9073658a8f9f7f0a0","tarball":"https://registry.npmjs.org/@aofl/api-request/-/api-request-3.0.0-alpha.12.tgz","fileCount":9,"integrity":"sha512-VzUpbP+/Ek9QJJ/b2piYnxrcYthKCUwGd8/jc2tbaIpRgC16lnNXACkFqUuHT++rmX/H+6NwM32+couLhAQ3Sg==","signatures":[{"sig":"MEUCIQDHxWjT8BqpT8cHsQkcg0wSzkwfxbUUrNxqXT3R/gJb6AIgBZqNX3Tf9GrlLwbJSiL9wl/yRyLRytld4vkm5o3tn2k=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":13244,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdvNfTCRA9TVsSAnZWagAAw+YP/ix/EwEA8cv7REjwijbN\nbZBRLC/5TEdKOGUWd40O+1g3o4dlCVGfCXnG7Bz6MIBoeM/DqAybXuanEU2a\naQfkuOdq6MwaxzBXmkkiGbC1Iba7WC2lf4Iux2Fdv+7qbxfsFj0M03ju8c1J\nn4Jt8Rl7UBrxWrj5Vd7T1nkYIyAxSNlSDYBdNFpzE5CuyvzbJ35TU9Jfh7c4\n9vOMbh0HL3LT0A8Qw4WxTBbmHoP+LckDEcdfS+dqCXDXgQWK/IY6WsTnd9bD\nVCR9ZsX4xJz5HnMYQrgiUdh1voAT57GQZb7DAjMT/JH4W52YCcqqGpNLNpx9\ngpzlJcTD8/7UASSOCN5ZpQ32eIAF+CCBv3tMlWXYji/NWkauy/TpwEp+cAqZ\ndjeCj/eVQLG9iZl3swVwLOIKKEwstwwp4uAOaweNjGp6bJLvqkeFSK7VowrF\nqEPO+HkYZpJiOCIDHuRdOJfLXe/62GFELqqBbZkW5YD2NVYk6BUaMY/ugng5\nRSKWE065Ynl97DQOG4PslXY9lNn8pWoMU7jFgcHXYr+mhUqIh03IB2B3Mv8o\nXBMSp3fVug3dLsDUVDgp6Sxs0/J7c+8R0L8RClvyhGhAVcV05h8KWYR1XmcS\ndwkX7INEoB7tla1NjZlZhF8JjIuUjgujcvMcjTC4ZdBtEpayD5ygE5jO0Y1O\nOUVZ\r\n=a5se\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# @aofl/api-request\n\nA module for making api calls easier. Key features include caching responses and request/response formatters.\n\nCaching is implemented using @aofl/cache-manager and uses MemoryCache. @aofl/api-request caches the promises created by fetch api.\n\nRequest/response formatting referes to constructing a request payload and parsing the response payload. A formatter object should implement `pack()` and `unpack()` properties. `pack()` is to construct the request payload and `unpack()` is used to parse the response. Any number of formatters can be added to `apiRequestInstance` using the `addFromatter()` method. E.g. `GetFormatter`, `PostFormatter`, `CorsFormatter`, `FileUploadFormatter`, `GoogleMapsFormatter`, ....\n\n## Examples\n* [Basic Example](https://codesandbox.io/s/github/AgeOfLearning/aofl/tree/master/aofl-js-packages/api-request/examples/simple)\n\n\n## Installation\n```bash\nnpm i -S @aofl/api-request\n```\n\n## Usage\n```javascript\nimport {ApiRequest} from '@aofl/api-request';\n\nclass PostFormatter {\n  static pack(payload) {\n    const headers = new Headers();\n    const body = new FormData();\n    const boundary = 'Boundary-' + Date.now();\n\n    headers.append('Accept', '*/*');\n    headers.append('Content-Type', 'multipart/form-data; boundary=' + boundary);\n\n    if (typeof payload !== 'undefined') {\n      body.append('arguments', JSON.stringify(payload));\n    }\n\n    return {\n      method: 'POST',\n      headers,\n      body,\n      mode: 'cors',\n      credentails: 'include'\n    };\n  }\n\n  static unpack(response) {\n    return response.json()\n    .then((data) => {\n      if (data.status !== 'success') {\n        return Promise.reject(data);\n      }\n      return data;\n    });\n  }\n}\n\nconst apiRequestInstance = new ApiRequest();\napiRequestInstance.addFormatter('post', PostFormatter);\n\napiRequestInstance.request('https://example.org/', {}, 'post', true, 'sample-namespace')\n.then((jsonResponse) => {\n})\n.catch((jsonResponse) => {\n});\n```\n","gitHead":"e76c3cfc8d75ca087492088254c9ef0e4010c0c9","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"lerna/3.18.3/node@v10.16.0+x64 (darwin)","description":"A module for simplifying api calls","directories":{},"_nodeVersion":"10.16.0","dependencies":{"@aofl/cache-manager":"^3.0.0-alpha.12"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/api-request_3.0.0-alpha.12_1572657107269_0.958727239839186","host":"s3://npm-registry-packages"}},"3.0.0-beta.40":{"name":"@aofl/api-request","version":"3.0.0-beta.40","keywords":["aofljs","@aofl/api-request","api request","api","cache response"],"author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/api-request@3.0.0-beta.40","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"contributors":[{"name":"Daniel Belisle","email":"daniel.belisle@aofl.com"},{"name":"Micah Blu","email":"micah.blu@aofl.com"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"be5e973a4ffe3fe3f00213afcbf94d6bc4ab1805","tarball":"https://registry.npmjs.org/@aofl/api-request/-/api-request-3.0.0-beta.40.tgz","fileCount":14,"integrity":"sha512-CeyszepH6UgnSEbtFkNTHZQmoepW5l9W8cTtEKvDP6L6RSLQZOeh5yDQNQoZgmeMPEo1FotMpYQKTtqNg/uxMQ==","signatures":[{"sig":"MEQCIAuDOVv365XSIta+YJclFBPArUrIy6NBtUcOAe3380tAAiAxfqpofNiES1Diwi9keye5ZtECqh2OzVG8aETmOyCyTw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":28042,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyeEzCRA9TVsSAnZWagAAvvIP/jzlZOxsMmXtALHQNiIN\nUJAD0ECv9hU4ZYXSj+eOrzQKTPiBjP2nZbHVhsvMNuO5JscqeZpj/ZkZkSE4\na6Tyzdus9enFZTvG0IZaAkmVf0Hc/7880a1Zhny0rNrNeJbmBqq6ELXZc82A\n0GW4SACgnyRDyGTcXZmMdMyiH/t7YnMUks8baNJtIQ/YmrF4qSiwe0Mysp1+\n1fDkP0/xaTG3Aifs60g68JNVQtnrVGPG3GGuRejvmSv1rhh8U4HVdjSIloo3\nygGmRyhPed6p1t4JsXusSHEA1TYgEErGoYdc4b/4QmmFPs421Y8jTOjRvBI1\ncMNhNDK61V9xLOO/DuTVdwKA9SScXE4cnEAZY+Th+ZsGIC1/klh3IzyNVMot\n7m8Jnrxb+XLz20zt+sjDOwz2UMBPJOGbarEf80uE0Kuxm0zqOwTeqPxYY/i0\nlziWmVm+IXUPila2I1xV2DYctjutaaWozeDi0IkHxmV3kwLK8oZr+HDxMuBM\nghUH8G0gEBbpxfLkvhwy+EYR0POcMm/rqcknk7VjRhLoSWXZARn+LIi701CJ\n6IeOrw70V4l/JUQOocb/lZMuW+AgOTxDLEIOKhtkJ6YoKYlaVCwO6txuyb/p\n69Sf2xWOs343PByn9j+gYTB7aAjpmwMuqjZYFnE7PZH9aQCYcl4O/ViEeXCj\nDuKf\r\n=rB0a\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","module":"index.js","readme":"# @aofl/api-request\n\nA module for making api calls easier. Key features include caching responses and request/response formatters.\n\nCaching is implemented using @aofl/cache-manager and uses MemoryCache. @aofl/api-request caches the promises created by fetch api.\n\nRequest/response formatting referes to constructing a request payload and parsing the response payload. A formatter object should implement `pack()` and `unpack()` properties. `pack()` is to construct the request payload and `unpack()` is used to parse the response. Any number of formatters can be added to `apiRequestInstance` using the `addFromatter()` method. E.g. `GetFormatter`, `PostFormatter`, `CorsFormatter`, `FileUploadFormatter`, `GoogleMapsFormatter`, ....\n\n[Api Documentation](https://ageoflearning.github.io/aofl/v3.x/api-docs/module-@aofl_api-request.html)\n\n## Examples\n* [Basic Example](https://codesandbox.io/s/github/AgeOfLearning/aofl/tree/v3.0.0/aofl-js-packages/api-request/examples/simple)\n\n## Installation\n```bash\nnpm i -S @aofl/api-request\n```\n\n## Usage\n```javascript\nimport {ApiRequest} from '@aofl/api-request';\n\nclass PostFormatter {\n  static pack(payload) {\n    const headers = new Headers();\n    const body = new FormData();\n\n    if (typeof payload !== 'undefined') {\n      body.append('arguments', JSON.stringify(payload));\n    }\n\n    return {\n      method: 'POST',\n      headers,\n      body,\n      mode: 'cors',\n      credentials: 'include'\n    };\n  }\n\n  static unpack(response) {\n    return response.json()\n    .then((data) => {\n      if (data.status !== 'success') {\n        return Promise.reject(data);\n      }\n      return data;\n    });\n  }\n}\n\nconst apiRequestInstance = new ApiRequest();\napiRequestInstance.addFormatter('post', PostFormatter);\n\napiRequestInstance.request('https://example.org/', {}, 'post', true, 'sample-namespace')\n.then((jsonResponse) => {\n})\n.catch((jsonResponse) => {\n});\n```\n","browser":"dist/index.js","gitHead":"0bfdc05f0d4406219d0b432a55fe53ab1726f4c0","scripts":{"docs":"jsdoc -c .jsdocrc.json .","test":"echo \"Error: no test specified\" && exit 1","build":"cross-env NODE_ENV=production aofl build","build:dev":"cross-env NODE_ENV=development aofl build","prepublishOnly":"npm run build && npm run docs"},"typings":"types.d.ts","_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"lerna/3.18.3/node@v10.16.0+x64 (darwin)","description":"A module for simplifying api calls","directories":{},"_nodeVersion":"10.16.0","_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jsdoc":"^3.6.3","@aofl/cli":"^3.0.0-beta.40","cross-env":"^6.0.3","tsd-jsdoc":"^2.4.0","jsdoc-babel":"^0.5.0","@aofl/cache-manager":"^3.0.0-beta.40"},"peerDependencies":{"@aofl/cache-manager":">= 3.0.0-beta.1 < 4.0.0"},"_npmOperationalInternal":{"tmp":"tmp/api-request_3.0.0-beta.40_1573511475515_0.024410685192137738","host":"s3://npm-registry-packages"}},"3.0.0-beta.41":{"name":"@aofl/api-request","version":"3.0.0-beta.41","keywords":["aofljs","@aofl/api-request","api request","api","cache response"],"author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/api-request@3.0.0-beta.41","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"contributors":[{"name":"Daniel Belisle","email":"daniel.belisle@aofl.com"},{"name":"Micah Blu","email":"micah.blu@aofl.com"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"1f06eb44d79b3201082f40b75be106db415546b1","tarball":"https://registry.npmjs.org/@aofl/api-request/-/api-request-3.0.0-beta.41.tgz","fileCount":14,"integrity":"sha512-tWeyScYyGnNu/SKgmdSghv0rEHYXJ+LZmIa1NcD1mgKm/76CfC95/TutJf4gNWK+GpMP9PvweH+Mnn+qn4cF3A==","signatures":[{"sig":"MEYCIQC8W4vWS3DEgjTVzmxZN5DySVgrEE2hEjsjy4X4Ji5RMgIhAJbyb37ZpejUe/7O8ibUKSwTSPzx3rOhmpC6HYHwJUjn","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":28113,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyjtICRA9TVsSAnZWagAArCsP/jQ0hqdYYs7NFRteTDpN\nok2eQzT7jzLeFm5ABd3B36z0fTsmI9bOu9jpNqJMJW6XLJgIOCid3Zj6QlF3\ncvNlx3VLuitYkPC3yyWnPd6x4ISdj4L+larInCmKhdTcEAQWJiQjnpAtPw/4\nKXt7lpHLhZJAuzY+i637P4HIYvUY9DVabrxs75xEDUrsHAO+Sy6fT1cDdPuG\nOslwBl65YwNd4SWpP1x8vvLne2sW7I9EMEkjWyLIBn8YOIJXpk3Jm5hs1c4c\niAXah5WcKbxvtjmSD/MQdrZISJMzpSSubOeRmcNoMZVXUs+FT8fcKwNJGe79\nwbzQr1EiFkVkVax5WiJUE2esbeVMMcn3T0ZMFwuTH4b8rUIVE6Q8rOwPA4wA\nddiGiBKsEDa03g/2APQHR+TKn1RUZpOL7Q1Bm43/nbJxx91ukGiJHSbQ3W8V\nYKtQRUl1lb88zQlyjqkctaRtU6ISIEGO4+NPSxHcgSmEdgb30DqwHbtpX6Vf\nDbFaHI+gG9itam5r1fqg+i9bdC5AjKTjgwuQ7oUheaB1QBndBHrFD66iF/Y2\nAU/MhOgtwWfx+ybPISkVoFeuhKdcWexxmCwXnB+SCqctOnpptatwOm5hS8Ie\n+363FZHlQJhsam1iIH81a5tgVDg/2ybUSjtTmm4/VzthfbDO2iETeSgDMTl8\nTP9+\r\n=nrpJ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","module":"index.js","readme":"# @aofl/api-request\n\nA module for making api calls easier. Key features include caching responses and request/response formatters.\n\nCaching is implemented using @aofl/cache-manager and uses MemoryCache. @aofl/api-request caches the promises created by fetch api.\n\nRequest/response formatting referes to constructing a request payload and parsing the response payload. A formatter object should implement `pack()` and `unpack()` properties. `pack()` is to construct the request payload and `unpack()` is used to parse the response. Any number of formatters can be added to `apiRequestInstance` using the `addFromatter()` method. E.g. `GetFormatter`, `PostFormatter`, `CorsFormatter`, `FileUploadFormatter`, `GoogleMapsFormatter`, ....\n\n[Api Documentation](https://ageoflearning.github.io/aofl/v3.x/api-docs/module-@aofl_api-request.html)\n\n## Examples\n* [Basic Example](https://codesandbox.io/s/github/AgeOfLearning/aofl/tree/v3.0.0/aofl-js-packages/api-request/examples/simple)\n\n## Installation\n```bash\nnpm i -S @aofl/api-request\n```\n\n## Usage\n```javascript\nimport {ApiRequest} from '@aofl/api-request';\n\nclass PostFormatter {\n  static pack(payload) {\n    const headers = new Headers();\n    const body = new FormData();\n\n    if (typeof payload !== 'undefined') {\n      body.append('arguments', JSON.stringify(payload));\n    }\n\n    return {\n      method: 'POST',\n      headers,\n      body,\n      mode: 'cors',\n      credentials: 'include'\n    };\n  }\n\n  static unpack(response) {\n    return response.json()\n    .then((data) => {\n      if (data.status !== 'success') {\n        return Promise.reject(data);\n      }\n      return data;\n    });\n  }\n}\n\nconst apiRequestInstance = new ApiRequest();\napiRequestInstance.addFormatter('post', PostFormatter);\n\napiRequestInstance.request('https://example.org/', {}, 'post', true, 'sample-namespace')\n.then((jsonResponse) => {\n})\n.catch((jsonResponse) => {\n});\n```\n","browser":"dist/index.js","gitHead":"212bc663acbda22a9679fadb2aa64484e35dc068","scripts":{"docs":"jsdoc -c .jsdocrc.json .","test":"echo \"Error: no test specified\" && exit 1","build":"cross-env NODE_ENV=production aofl build","build-ci":"cross-env NODE_ENV=production aofl build --debug","build:dev":"cross-env NODE_ENV=development aofl build","prepublishOnly":"npm run build-ci && npm run docs"},"typings":"types.d.ts","_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"lerna/3.18.4/node@v10.16.0+x64 (darwin)","description":"A module for simplifying api calls","directories":{},"_nodeVersion":"10.16.0","_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jsdoc":"^3.6.3","@aofl/cli":"^3.0.0-beta.41","cross-env":"^6.0.3","tsd-jsdoc":"^2.4.0","jsdoc-babel":"^0.5.0","@aofl/cache-manager":"^3.0.0-beta.41"},"peerDependencies":{"@aofl/cache-manager":">= 3.0.0-beta.1 < 4.0.0"},"_npmOperationalInternal":{"tmp":"tmp/api-request_3.0.0-beta.41_1573534536106_0.9715825111803076","host":"s3://npm-registry-packages"}},"3.0.0-beta.42":{"name":"@aofl/api-request","version":"3.0.0-beta.42","keywords":["aofljs","@aofl/api-request","api request","api","cache response"],"author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/api-request@3.0.0-beta.42","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"contributors":[{"name":"Daniel Belisle","email":"daniel.belisle@aofl.com"},{"name":"Micah Blu","email":"micah.blu@aofl.com"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"c9d66930c7a24273fcc2f2f151c78bd92f2be649","tarball":"https://registry.npmjs.org/@aofl/api-request/-/api-request-3.0.0-beta.42.tgz","fileCount":14,"integrity":"sha512-aEqi0vPSeILV/fSwRSCgqA/6a4zyH6K30J4HY0/cT+BoU4soBrV5oAmc7j3pY/zTaeqlTc8O/bx7NNJPFh3dDg==","signatures":[{"sig":"MEUCIQCmHuDlQU5Kx2mclRuYiRXJgYIKKBedonwEBNwlKJa26AIgJube9RFlTnuQOPMAjvWoDD11V973MCXr6OCP2aUmsmA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":28113,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdykjoCRA9TVsSAnZWagAAabAP/RZASAi+i19E2iXxMq0C\n9DAqYCQ7vs9Z1R2Q2BEwmEOrbN8Ik5vQQRBhiKjzWYmXXydUlYvOEAblbix5\nuXJjmFitrAinxvB0P30NQdOQ3I+K7Tzgjwm+RylBRc/sH7jC079j369P5Mcv\nZyeD3gN6plhdh92zFg97C9dczYhVo8aIFL2nduK4EEotlYsUdb3Ho753greX\noyBGLGpWeUJTog5O2AiwLPDXtyH5K/D+qzuUx/NmNwwYMuziHp0AMvlpi2hu\nSZ9/41Fw7ZYGis7PFyhx8EYI8xwm/QCW60uGQ7nucBcWFJML1oZmulwjFtqp\nW2+hZHbJavq9HT4uA15PqY0iiN0bpX0vrmFdBfPH0UgcNUpRNvE8qZvTyYYb\nzn44fA5t3HJWLozggZVrlhNydHTJZbwYNoP6geMqRmjNkPlCRIPzedMK3b3V\nIJe6oJHwC94Ehx16hDojkQ0f3ipzZkAMVg5Ah0Fk+oBIXwwaT5P3uNmqD7Y1\nGdx9yPPMbkLRMnHfJaRXHau5tCfoi+I4lels7y3YVGbpUqPBQhrtO3COYXH7\n46dz29lzanBSleWRli8e4ou7geRGaCEt6ZaGV63iTIv1RswyR4XILe++jRma\ntVNFmH8/tNBJUa0BIm1c+Bi+XW/BkdviJ7BPjnwIXzJ2JSOrXxteN4STBCx+\n5SPl\r\n=nOIJ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","module":"index.js","readme":"# @aofl/api-request\n\nA module for making api calls easier. Key features include caching responses and request/response formatters.\n\nCaching is implemented using @aofl/cache-manager and uses MemoryCache. @aofl/api-request caches the promises created by fetch api.\n\nRequest/response formatting referes to constructing a request payload and parsing the response payload. A formatter object should implement `pack()` and `unpack()` properties. `pack()` is to construct the request payload and `unpack()` is used to parse the response. Any number of formatters can be added to `apiRequestInstance` using the `addFromatter()` method. E.g. `GetFormatter`, `PostFormatter`, `CorsFormatter`, `FileUploadFormatter`, `GoogleMapsFormatter`, ....\n\n[Api Documentation](https://ageoflearning.github.io/aofl/v3.x/api-docs/module-@aofl_api-request.html)\n\n## Examples\n* [Basic Example](https://codesandbox.io/s/github/AgeOfLearning/aofl/tree/v3.0.0/aofl-js-packages/api-request/examples/simple)\n\n## Installation\n```bash\nnpm i -S @aofl/api-request\n```\n\n## Usage\n```javascript\nimport {ApiRequest} from '@aofl/api-request';\n\nclass PostFormatter {\n  static pack(payload) {\n    const headers = new Headers();\n    const body = new FormData();\n\n    if (typeof payload !== 'undefined') {\n      body.append('arguments', JSON.stringify(payload));\n    }\n\n    return {\n      method: 'POST',\n      headers,\n      body,\n      mode: 'cors',\n      credentials: 'include'\n    };\n  }\n\n  static unpack(response) {\n    return response.json()\n    .then((data) => {\n      if (data.status !== 'success') {\n        return Promise.reject(data);\n      }\n      return data;\n    });\n  }\n}\n\nconst apiRequestInstance = new ApiRequest();\napiRequestInstance.addFormatter('post', PostFormatter);\n\napiRequestInstance.request('https://example.org/', {}, 'post', true, 'sample-namespace')\n.then((jsonResponse) => {\n})\n.catch((jsonResponse) => {\n});\n```\n","browser":"dist/index.js","gitHead":"699b13b7bf651fa15a25ee2873b72d9fa1ef14a1","scripts":{"docs":"jsdoc -c .jsdocrc.json .","test":"echo \"Error: no test specified\" && exit 1","build":"cross-env NODE_ENV=production aofl build","build-ci":"cross-env NODE_ENV=production aofl build --debug","build:dev":"cross-env NODE_ENV=development aofl build","prepublishOnly":"npm run build-ci && npm run docs"},"typings":"types.d.ts","_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"lerna/3.18.4/node@v10.16.0+x64 (darwin)","description":"A module for simplifying api calls","directories":{},"_nodeVersion":"10.16.0","_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jsdoc":"^3.6.3","@aofl/cli":"^3.0.0-beta.42","cross-env":"^6.0.3","tsd-jsdoc":"^2.4.0","jsdoc-babel":"^0.5.0","@aofl/cache-manager":"^3.0.0-beta.42"},"peerDependencies":{"@aofl/cache-manager":">= 3.0.0-beta.1 < 4.0.0"},"_npmOperationalInternal":{"tmp":"tmp/api-request_3.0.0-beta.42_1573538024078_0.4872384430826091","host":"s3://npm-registry-packages"}},"3.0.0-beta.46":{"name":"@aofl/api-request","version":"3.0.0-beta.46","keywords":["aofljs","@aofl/api-request","api request","api","cache response"],"author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/api-request@3.0.0-beta.46","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"contributors":[{"name":"Daniel Belisle","email":"daniel.belisle@aofl.com"},{"name":"Micah Blu","email":"micah.blu@aofl.com"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"3b0616f9f23d20baaf5cf2c2b725f3b8fbbb0451","tarball":"https://registry.npmjs.org/@aofl/api-request/-/api-request-3.0.0-beta.46.tgz","fileCount":14,"integrity":"sha512-r4Imr69lufvzxNHGSED5+GCUMO0coquQR6NxKp+7130S+nSk4Ic+jDALs5/8Ia+BF3KIyy28VYEBNXlu7S/ROg==","signatures":[{"sig":"MEYCIQC9jiPtEZ+2gzHK8J+YoNIGTrlRI0p3ZMYOJoh0SpnojAIhAMy+or1d18ZvnG1dsbJ9fR+6Jkw3Fhb/nfDFf2ErXeYP","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":28113,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdzc33CRA9TVsSAnZWagAAiYAP/A988jWyNoVxJGv4B9Xq\nKTmEaCU4uwBqZbbPDVg6BsP2du7h+/pu8fCLvZtCqZxDzirgIbiGN6B98yBl\nLDGOgeD6UXKwVTS74peRhTsibmMDkxikHHWIy3+XX09gtyTW98THelXUNdb/\nTLroH9EQs1t81mD/WX9xvw3KTv/4a4iCwzcItSz1n1gh0WBz3h/SUg6+68b1\nx1HrjuUYwGajE6IfNID7GbIUxJ7kE316EY/jq2vTsw8eQo0HBsD10GqNlq99\n1kjzZmMALtsqyDIY4EoFpVXaytFi+asi2+XQMszat+l3yz4LNIfsyvnCn/u5\nHzkm8324BWi6yfHOKjZNfIr7f1rw8ZuR8bH8BVXATvB4KpHyQozOmo1i8fr3\nhbsFrCabdiVXDavKFYFcHHNh7aCxzczJb1xk3MWl2zBy2sMopmcOGF+/hKfb\nURrT/dMlo46l8fMwts9T+X60LWn26td/3XOxQFyKrzKc8+UxkjWuPfMU3ZUx\nefWzsnLuSQygrP2ri6PCnh0DF8jRz6+Hk53k1OiFDVYTQ1H70blMiNACyNK8\nYFrwhlEQ05/bWDRsoNSENpwZPvV7y937yZI4qrYyuMQmTO+PVJD9Cetg/5/A\nDQDlaiS10+jgzv5ZNPd6g5zyjKbsHl3KvNe7eTfrdGfpxAm/BOaUdeBtt8B9\ncjAp\r\n=BUGs\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","module":"index.js","readme":"# @aofl/api-request\n\nA module for making api calls easier. Key features include caching responses and request/response formatters.\n\nCaching is implemented using @aofl/cache-manager and uses MemoryCache. @aofl/api-request caches the promises created by fetch api.\n\nRequest/response formatting referes to constructing a request payload and parsing the response payload. A formatter object should implement `pack()` and `unpack()` properties. `pack()` is to construct the request payload and `unpack()` is used to parse the response. Any number of formatters can be added to `apiRequestInstance` using the `addFromatter()` method. E.g. `GetFormatter`, `PostFormatter`, `CorsFormatter`, `FileUploadFormatter`, `GoogleMapsFormatter`, ....\n\n[Api Documentation](https://ageoflearning.github.io/aofl/v3.x/api-docs/module-@aofl_api-request.html)\n\n## Examples\n* [Basic Example](https://codesandbox.io/s/github/AgeOfLearning/aofl/tree/v3.0.0/aofl-js-packages/api-request/examples/simple)\n\n## Installation\n```bash\nnpm i -S @aofl/api-request\n```\n\n## Usage\n```javascript\nimport {ApiRequest} from '@aofl/api-request';\n\nclass PostFormatter {\n  static pack(payload) {\n    const headers = new Headers();\n    const body = new FormData();\n\n    if (typeof payload !== 'undefined') {\n      body.append('arguments', JSON.stringify(payload));\n    }\n\n    return {\n      method: 'POST',\n      headers,\n      body,\n      mode: 'cors',\n      credentials: 'include'\n    };\n  }\n\n  static unpack(response) {\n    return response.json()\n    .then((data) => {\n      if (data.status !== 'success') {\n        return Promise.reject(data);\n      }\n      return data;\n    });\n  }\n}\n\nconst apiRequestInstance = new ApiRequest();\napiRequestInstance.addFormatter('post', PostFormatter);\n\napiRequestInstance.request('https://example.org/', {}, 'post', true, 'sample-namespace')\n.then((jsonResponse) => {\n})\n.catch((jsonResponse) => {\n});\n```\n","browser":"dist/index.js","gitHead":"4d18597a6b3e63324cc8b2f401d986dff832a62f","scripts":{"docs":"jsdoc -c .jsdocrc.json .","test":"echo \"Error: no test specified\" && exit 1","build":"cross-env NODE_ENV=production aofl build","build-ci":"cross-env NODE_ENV=production aofl build --debug","build:dev":"cross-env NODE_ENV=development aofl build","prepublishOnly":"npm run build-ci && npm run docs"},"typings":"types.d.ts","_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"lerna/3.18.4/node@v10.16.0+x64 (darwin)","description":"A module for simplifying api calls","directories":{},"_nodeVersion":"10.16.0","_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jsdoc":"^3.6.3","@aofl/cli":"^3.0.0-beta.46","cross-env":"^6.0.3","tsd-jsdoc":"^2.4.0","jsdoc-babel":"^0.5.0","@aofl/cache-manager":"^3.0.0-beta.46"},"peerDependencies":{"@aofl/cache-manager":">= 3.0.0-beta.1 < 4.0.0"},"_npmOperationalInternal":{"tmp":"tmp/api-request_3.0.0-beta.46_1573768695263_0.2640443699212458","host":"s3://npm-registry-packages"}},"3.0.0-beta.47":{"name":"@aofl/api-request","version":"3.0.0-beta.47","keywords":["aofljs","@aofl/api-request","api request","api","cache response"],"author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/api-request@3.0.0-beta.47","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"contributors":[{"name":"Daniel Belisle","email":"daniel.belisle@aofl.com"},{"name":"Micah Blu","email":"micah.blu@aofl.com"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"9fe95aa1be9bc94d22111368b1edb647b673ea38","tarball":"https://registry.npmjs.org/@aofl/api-request/-/api-request-3.0.0-beta.47.tgz","fileCount":12,"integrity":"sha512-1RdkDCKeRFWfLmvviGJpXTIoV6ffLDmgm5JIfil400pgV7vPSquVOCP1Qz8Q1oZQYA2V2PaISmMA6Luf7xF+LQ==","signatures":[{"sig":"MEUCIQC1fL94tpfFuWxrFMY6AaM54ySRGaFrybDtq0UBC8NiywIgCVN6/BDuuqLHUmZ/sWbuINLXo5RCNuYd3rBXbPorIkM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":22080,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdzfXuCRA9TVsSAnZWagAAyKUQAIXGkrhLg/p4VDe3VnHN\np7VMq8gH2/975XJLytdnS83R9FZpxPZFJMOmnEz3OuMT+3qzYbXMw+rLOvxL\np17wxui4/1aHWThupqTBBqztekOAQKCgqNp9r7n6BSWPGV1aUmakrb4KI9GF\nBNPR4KV/unTTzpCrUz+zIiYicdSqhrzqBChYqHWexwLqJIfThjDmnf00J/cQ\niVLcjkiRvYPclrrBkJanFoRf1ro3GW2Ckyd14t+3ZG+YIxVImK/9dOw07APF\nsYOSV+vq1Ol4jqbAeZ2L8y5Y068uIfeJWHuVvEHJa8OGHrm1d6UX9zCiXuAX\n9rjQ3SDy07292TnVdEguvamz2+4savLUxpzz6qcVIj5Us/QSMunG9nfOJ2ik\nHZSkU5de8bI/xNDItQsMAvorMlQtWa5/XWKOBwaXQgZ99qVTAd8z9qYLWC+B\nO9yDCOB9ir/p5JzSf03akj16NgCzq+yyFaHb/yY8FubtgdgIf+ZTIUC+z9SJ\n8brrxDNaGwKR/RIS/FTfMFNSfJaroZzgMBPp9SP2WvuODtMZ8H8hCG/iuqmd\nLAbkx8Wr+Q4B6a4DwMSLYkVBURALN5cRU8TTcKYDPuEsSZqjVmxiN4slpo8K\nU/JW3BiRv1OylNCu2127/QaqgcSfFCaGBsGSYqiVwVuTscuZ3JvWJe3FQGxP\n0PPU\r\n=idM8\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","module":"index.js","readme":"# @aofl/api-request\n\nA module for making api calls easier. Key features include caching responses and request/response formatters.\n\nCaching is implemented using @aofl/cache-manager and uses MemoryCache. @aofl/api-request caches the promises created by fetch api.\n\nRequest/response formatting referes to constructing a request payload and parsing the response payload. A formatter object should implement `pack()` and `unpack()` properties. `pack()` is to construct the request payload and `unpack()` is used to parse the response. Any number of formatters can be added to `apiRequestInstance` using the `addFromatter()` method. E.g. `GetFormatter`, `PostFormatter`, `CorsFormatter`, `FileUploadFormatter`, `GoogleMapsFormatter`, ....\n\n[Api Documentation](https://ageoflearning.github.io/aofl/v3.x/api-docs/module-@aofl_api-request.html)\n\n## Examples\n* [Basic Example](https://codesandbox.io/s/github/AgeOfLearning/aofl/tree/v3.0.0/aofl-js-packages/api-request/examples/simple)\n\n## Installation\n```bash\nnpm i -S @aofl/api-request\n```\n\n## Usage\n```javascript\nimport {ApiRequest} from '@aofl/api-request';\n\nclass PostFormatter {\n  static pack(payload) {\n    const headers = new Headers();\n    const body = new FormData();\n\n    if (typeof payload !== 'undefined') {\n      body.append('arguments', JSON.stringify(payload));\n    }\n\n    return {\n      method: 'POST',\n      headers,\n      body,\n      mode: 'cors',\n      credentials: 'include'\n    };\n  }\n\n  static unpack(response) {\n    return response.json()\n    .then((data) => {\n      if (data.status !== 'success') {\n        return Promise.reject(data);\n      }\n      return data;\n    });\n  }\n}\n\nconst apiRequestInstance = new ApiRequest();\napiRequestInstance.addFormatter('post', PostFormatter);\n\napiRequestInstance.request('https://example.org/', {}, 'post', true, 'sample-namespace')\n.then((jsonResponse) => {\n})\n.catch((jsonResponse) => {\n});\n```\n","browser":"dist/index.js","gitHead":"11344382e361206a6f67f05f4904149ead37c1ed","scripts":{"docs":"jsdoc -c .jsdocrc.json .","test":"echo \"Error: no test specified\" && exit 1","build":"cross-env NODE_ENV=production aofl build","build-ci":"cross-env NODE_ENV=production aofl build --debug","build:dev":"cross-env NODE_ENV=development aofl build","prepublishOnly":"npm run build-ci && npm run docs"},"typings":"types.d.ts","_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"lerna/3.18.4/node@v10.16.0+x64 (darwin)","description":"A module for simplifying api calls","directories":{},"_nodeVersion":"10.16.0","_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jsdoc":"^3.6.3","@aofl/cli":"^3.0.0-beta.46","cross-env":"^6.0.3","tsd-jsdoc":"^2.4.0","jsdoc-babel":"^0.5.0","@aofl/cache-manager":"^3.0.0-beta.47"},"peerDependencies":{"@aofl/cache-manager":">= 3.0.0-beta.1 < 4.0.0"},"_npmOperationalInternal":{"tmp":"tmp/api-request_3.0.0-beta.47_1573778925758_0.09235530794722036","host":"s3://npm-registry-packages"}},"3.0.0-beta.48":{"name":"@aofl/api-request","version":"3.0.0-beta.48","keywords":["aofljs","@aofl/api-request","api request","api","cache response"],"author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/api-request@3.0.0-beta.48","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"contributors":[{"name":"Daniel Belisle","email":"daniel.belisle@aofl.com"},{"name":"Micah Blu","email":"micah.blu@aofl.com"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"e2d0801fcf97536b5e90c981c0d8852993e13dc8","tarball":"https://registry.npmjs.org/@aofl/api-request/-/api-request-3.0.0-beta.48.tgz","fileCount":12,"integrity":"sha512-HmyYg+JdU60c7WhJ3BzqrNHLjUGb3xKTk85dcT51+zCI1d85/g6bxI6ZDL3Ra8mlxYdMCjh5H5+SSprw4iChBQ==","signatures":[{"sig":"MEYCIQDr3cZ1iZeFb6RYBwQkWd8FOIqx8prnuiGtN84JqVsg7AIhAInBWPKjqFOnGO2bUWKRjnOYp7sim8gvrKWdGz0AdTUT","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":22092,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd0IfgCRA9TVsSAnZWagAAy+wP/ji+An2Mj6XGyZ0sRjIH\n72DK9zXdujBiuBk2vjUeT41gYJ5LWled18W28ARS1dbwWO2It2JQ9388hSBD\nobtaCSdyqZNW40TSdbURCEUN1V/SN7V2yE9VkMEwHDrN947Yk0GKI4frN3ex\nlQrmq/sidLGRG7DNLJjS76C0goHt4X+r1+KwxqJkAJrE/VJnnIU0DR2RxE/Q\n4x2gf7g5DoEF33yjGH4DA/ADLauzg6Ho2gVzLtihvPN0RC9HM313jyRJinSg\nUW//flJ3A6p/qmPiCn1pP7oUDn7JTJLKJHkVBVp+zXapT36vgnto/SSFXbaG\n/j/dZl+W7uOXhyoHUDe/R1DTY1ZjavTNH75/5IciqDon72oG+0MBkquqgm0l\n1NAh4HfZAU0eI/YZyBibp4T5CDKcyxgez0RLdlGDXjLlik576tdV2lQqMZ0Q\n5LTQIbyCOOaKut3xUvM65P4UY8MnAhi0mxAPDBEc/rgA083C9IN9ANxgtAje\nQSPDOQ/Aa6IKIsyuKYrPf2kWvuGCt/WfxLK+mBRPdYL65tpSTy9N2cpp/3zO\nUWnFAj1CbSgG6nY1Gzf42/oxa10ntNbq1uxns97hJpNxy5wz4SbOQMS4vbow\nb5fAEsAvypMbW81BtY9kj1Pw+R103b15G+zvqdQrujSmp0LU9DQKaXLlh/w7\nj34L\r\n=qCj1\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","module":"index.js","readme":"# @aofl/api-request\n\nA module for making api calls easier. Key features include caching responses and request/response formatters.\n\nCaching is implemented using @aofl/cache-manager and uses MemoryCache. @aofl/api-request caches the promises created by fetch api.\n\nRequest/response formatting referes to constructing a request payload and parsing the response payload. A formatter object should implement `pack()` and `unpack()` properties. `pack()` is to construct the request payload and `unpack()` is used to parse the response. Any number of formatters can be added to `apiRequestInstance` using the `addFromatter()` method. E.g. `GetFormatter`, `PostFormatter`, `CorsFormatter`, `FileUploadFormatter`, `GoogleMapsFormatter`, ....\n\n[Api Documentation](https://ageoflearning.github.io/aofl/v3.x/api-docs/module-@aofl_api-request.html)\n\n## Examples\n* [Basic Example](https://codesandbox.io/s/github/AgeOfLearning/aofl/tree/v3.0.0/aofl-js-packages/api-request/examples/simple)\n\n## Installation\n```bash\nnpm i -S @aofl/api-request\n```\n\n## Usage\n```javascript\nimport {ApiRequest} from '@aofl/api-request';\n\nclass PostFormatter {\n  static pack(payload) {\n    const headers = new Headers();\n    const body = new FormData();\n\n    if (typeof payload !== 'undefined') {\n      body.append('arguments', JSON.stringify(payload));\n    }\n\n    return {\n      method: 'POST',\n      headers,\n      body,\n      mode: 'cors',\n      credentials: 'include'\n    };\n  }\n\n  static unpack(response) {\n    return response.json()\n    .then((data) => {\n      if (data.status !== 'success') {\n        return Promise.reject(data);\n      }\n      return data;\n    });\n  }\n}\n\nconst apiRequestInstance = new ApiRequest();\napiRequestInstance.addFormatter('post', PostFormatter);\n\napiRequestInstance.request('https://example.org/', {}, 'post', true, 'sample-namespace')\n.then((jsonResponse) => {\n})\n.catch((jsonResponse) => {\n});\n```\n","browser":"dist/index.js","gitHead":"d77a51a21b591d1ac0032de47395878116e8566a","scripts":{"docs":"npx jsdoc -c .jsdocrc.json .","test":"echo \"Error: no test specified\" && exit 1","build":"cross-env NODE_ENV=production aofl build","build-ci":"cross-env NODE_ENV=production aofl build --debug","build:dev":"cross-env NODE_ENV=development aofl build","prepublishOnly":"npm run build-ci && npm run docs"},"typings":"types.d.ts","_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"lerna/3.18.4/node@v10.16.3+x64 (darwin)","description":"A module for simplifying api calls","directories":{},"_nodeVersion":"10.16.3","_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jsdoc":"^3.6.3","@aofl/cli":"^3.0.0-beta.48","cross-env":"^6.0.3","tsd-jsdoc":"^2.4.0","jsdoc-babel":"^0.5.0","@aofl/cache-manager":"^3.0.0-beta.48"},"peerDependencies":{"@aofl/cache-manager":">= 3.0.0-beta.1 < 4.0.0"},"_npmOperationalInternal":{"tmp":"tmp/api-request_3.0.0-beta.48_1573947360455_0.21972518988406864","host":"s3://npm-registry-packages"}},"3.0.0-beta.49":{"name":"@aofl/api-request","version":"3.0.0-beta.49","keywords":["aofljs","@aofl/api-request","api request","api","cache response"],"author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/api-request@3.0.0-beta.49","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"contributors":[{"name":"Daniel Belisle","email":"daniel.belisle@aofl.com"},{"name":"Micah Blu","email":"micah.blu@aofl.com"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"ab1d3d72b1f9e7682c5d1279c290080823e0a34b","tarball":"https://registry.npmjs.org/@aofl/api-request/-/api-request-3.0.0-beta.49.tgz","fileCount":12,"integrity":"sha512-mPryRx2MQ5RmgviB1icHv46wyNF6OSwzOkvtiu4zibpt6NaTOu9ncxdFclv6AFsquLC3WzTlPe0W1pyhj+HXew==","signatures":[{"sig":"MEQCIE4Q/PgDnV7b7GKnU6dXsele9z3ZHRaFTbstHQciFimTAiBp6GpVSpGg1KQzUp/p64ifDK7IPp+j06IajERqXS0r+g==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":22017,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd0MCRCRA9TVsSAnZWagAAgn4QAIhMSGRlmlbtpCrV/yBm\nvM7EgawSWfs1GoSvT/lfqkBaFyBY+r6htXOaduCzFDRveZluIQCK9CeW7uL5\nBatfbMAGdoCOC/kTgpFBceayt67QQIVit6rPlo47ae3+d9sAPOgZNLwEULHl\n7H5K8HbG8f+JLRTaWUx5sUMe6vFdlLu1VOkEnpgslC94DBWFjUM7N1fVTcKy\nKf0ZeHRd7kLtGEeObS5QGUzp1u8PX2EDPYr9Tmu52FS3VsbnNTak3OqSU7+X\nfiykxqUdiH/gkJVz36JXBxdRYMzmvSK/MzAG7/n9C9ae0pJ+V/gD9EgGftOv\nPz4DpxwqhXozah+1dY6fsmcBcqSO6j5R6QnoQudJw6OMEd1I3M5ZPRP42noU\nQgvMhhxU8V1UrUt9gfQ2EU7wlvtIDL/ZeFT+wOircfKx0W9UY4zXU8Sffd5s\nDpn/gU99DUKknnPijcWd47krZeRSYX4HzKtSQrTQdSBFiWZRquldoC5RzSC3\nHL6hpLCZY7OOMaE25iZQzxwLuZFY52xyJFRRMDHK7XpI1I6J+B3YKZRRRU52\nWVMBHV3EknqXxuOeNlr2dybgn6yAdmL4DP66h/axFLBLioni9J9LghgJEXBF\nG3baCFV0kR2zUpdESeG4GYJVk69KcY0nzV+qQNdjZb8mx/xvGBHkXsn/jisp\nZEQj\r\n=c4aL\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","module":"index.js","readme":"# @aofl/api-request\n\nA module for making api calls easier. Key features include caching responses and request/response formatters.\n\nCaching is implemented using @aofl/cache-manager and uses MemoryCache. @aofl/api-request caches the promises created by fetch api.\n\nRequest/response formatting referes to constructing a request payload and parsing the response payload. A formatter object should implement `pack()` and `unpack()` properties. `pack()` is to construct the request payload and `unpack()` is used to parse the response. Any number of formatters can be added to `apiRequestInstance` using the `addFromatter()` method. E.g. `GetFormatter`, `PostFormatter`, `CorsFormatter`, `FileUploadFormatter`, `GoogleMapsFormatter`, ....\n\n[Api Documentation](https://ageoflearning.github.io/aofl/v3.x/api-docs/module-@aofl_api-request.html)\n\n## Examples\n* [Basic Example](https://codesandbox.io/s/github/AgeOfLearning/aofl/tree/v3.0.0/aofl-js-packages/api-request/examples/simple)\n\n## Installation\n```bash\nnpm i -S @aofl/api-request\n```\n\n## Usage\n```javascript\nimport {ApiRequest} from '@aofl/api-request';\n\nclass PostFormatter {\n  static pack(payload) {\n    const headers = new Headers();\n    const body = new FormData();\n\n    if (typeof payload !== 'undefined') {\n      body.append('arguments', JSON.stringify(payload));\n    }\n\n    return {\n      method: 'POST',\n      headers,\n      body,\n      mode: 'cors',\n      credentials: 'include'\n    };\n  }\n\n  static unpack(response) {\n    return response.json()\n    .then((data) => {\n      if (data.status !== 'success') {\n        return Promise.reject(data);\n      }\n      return data;\n    });\n  }\n}\n\nconst apiRequestInstance = new ApiRequest();\napiRequestInstance.addFormatter('post', PostFormatter);\n\napiRequestInstance.request('https://example.org/', {}, 'post', true, 'sample-namespace')\n.then((jsonResponse) => {\n})\n.catch((jsonResponse) => {\n});\n```\n","browser":"dist/index.js","gitHead":"a2642ff8dd100adac8db3d609f63e2bc6a2247f5","scripts":{"docs":"npx jsdoc -c .jsdocrc.json .","test":"echo \"Error: no test specified\" && exit 1","build":"cross-env NODE_ENV=production aofl build","build-ci":"cross-env NODE_ENV=production aofl build --debug","build:dev":"cross-env NODE_ENV=development aofl build","prepublishOnly":"npm run build-ci && npm run docs"},"typings":"types.d.ts","_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"lerna/3.18.4/node@v10.16.3+x64 (darwin)","description":"A module for simplifying api calls","directories":{},"_nodeVersion":"10.16.3","_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jsdoc":"^3.6.3","@aofl/cli":"^3.0.0-beta.49","cross-env":"^6.0.3","tsd-jsdoc":"^2.4.0","@aofl/cache-manager":"^3.0.0-beta.49"},"peerDependencies":{"@aofl/cache-manager":">= 3.0.0-beta.1 < 4.0.0"},"_npmOperationalInternal":{"tmp":"tmp/api-request_3.0.0-beta.49_1573961873213_0.2573909537787742","host":"s3://npm-registry-packages"}},"3.0.0":{"name":"@aofl/api-request","version":"3.0.0","keywords":["aofljs","@aofl/api-request","api request","api","cache response"],"author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/api-request@3.0.0","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"contributors":[{"name":"Daniel Belisle","email":"daniel.belisle@aofl.com"},{"name":"Micah Blu","email":"micah.blu@aofl.com"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"7eb900d3aa6eee8083dae0f424002f9714c83d43","tarball":"https://registry.npmjs.org/@aofl/api-request/-/api-request-3.0.0.tgz","fileCount":12,"integrity":"sha512-bxV+pn8EjeJuEETGSfRjUvTji8NKA6LoZTlWtNxMChoMijpGMUgCkOYnE7tJ5zOzz9nUeQNs5QsbrODBOteLVg==","signatures":[{"sig":"MEQCIC+FdMwi3feX6umkqk2J+PkAFFf6kYKhM28BYExGa6sWAiAamknFb5fLnk/CZl+vDOCeFDK2M2v8O+Nzmmmha2mZ5g==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":21993,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd0PFfCRA9TVsSAnZWagAAp2sP/ivYHouC7MIdqGdqGEuR\nPGLSkHiZrEQiB7ewOArYQR4fAalaGBwNVD3Yd7X+7lZvzaMMFN0AgInIXPZj\neTKLPJnGcUV9b0eD9cJsb/TY02YzXML+G0oiyWlo/iwcpPYoDoj8tkI3e56p\nRXSKXQ5Nl1GFR5HSzx4HLIi0HPx131DcDT7LT4hihOdRskQwoF/ZEqmwxnpZ\n9BCZegs0F55ps9CpAqRQyNoZa3lTbfWpjFxG7kN5rdV9P9TDd8owERuS9GaI\nunmV8MvYo4XK8NAH45vaSLHUsEZbTkSNDMwzgnYMjrWxkEjXr4nN2JH3bqB/\nMh5FbJ4BaCBYQSc5Yy9HVx7Cy/TjaJnfRnyBjCDusRldfV/S4cgc+lEGoBlH\nKuqs+ljTDTB6ZDhKL4SUNw2U85qvfmJC+n1284bN700Mnb2QwnQYPBEk0vuF\nFeHBuPVGXeNH7668JU7P+Sbf3Kxx61LVcoG/BqzyZBD06H5lTgA1ZCvcRWyk\nK7eAr4yvM7emeqWLOtGIQoSDm5u8cUx2J4CmWJ6/bmW3n18wabDVcG33ZL1/\n7mQ7RW0JkjA1JRLhFCavLB438lPULqXqbFKpQdNmv26eSUxJjfyRzKh6PIyU\nZ7cnvI33oeFwT5O2PK59nqhaQVkqYKJstnJImIpZfzSFp2+g1w2xNWdwWeCk\nG7GX\r\n=bMJm\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","module":"index.js","browser":"dist/index.js","gitHead":"bd783440a25a2c579fbb506b92d90bf4fb7e0289","scripts":{"docs":"npx jsdoc -c .jsdocrc.json .","test":"echo \"Error: no test specified\" && exit 1","build":"cross-env NODE_ENV=production aofl build","build-ci":"cross-env NODE_ENV=production aofl build --debug","build:dev":"cross-env NODE_ENV=development aofl build","prepublishOnly":"npm run build-ci && npm run docs"},"typings":"types.d.ts","_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"lerna/3.18.4/node@v10.16.3+x64 (darwin)","description":"A module for simplifying api calls","directories":{},"_nodeVersion":"10.16.3","_hasShrinkwrap":false,"devDependencies":{"jsdoc":"^3.6.3","@aofl/cli":"^3.0.0","cross-env":"^6.0.3","tsd-jsdoc":"^2.4.0","@aofl/cache-manager":"^3.0.0"},"peerDependencies":{"@aofl/cache-manager":">= 3.0.0-beta.1 < 4.0.0"},"_npmOperationalInternal":{"tmp":"tmp/api-request_3.0.0_1573974366766_0.19577993355922696","host":"s3://npm-registry-packages"}},"3.1.0":{"name":"@aofl/api-request","version":"3.1.0","keywords":["aofljs","@aofl/api-request","api request","api","cache response"],"author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/api-request@3.1.0","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"contributors":[{"name":"Daniel Belisle","email":"daniel.belisle@aofl.com"},{"name":"Micah Blu","email":"micah.blu@aofl.com"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"ccfbb6cfae94d4497362891c0e7b86ec4ac10981","tarball":"https://registry.npmjs.org/@aofl/api-request/-/api-request-3.1.0.tgz","fileCount":12,"integrity":"sha512-/IbjrZt2OGYojZ9HLyJ0ps0bqbrj9FHRLebz9kdT6d7+FVDDwXweij5wPPvd6x+opCBDtW1bIAcQvmfo7PqPkg==","signatures":[{"sig":"MEYCIQDSvXWVM9MrLnnmHZ5tlr4DLxx51+NIOf6l/uwAIL4kpgIhAPxFb80mEcSWDa24SPJbkZxiLNtuW4niik3rng0VsDsP","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":21989,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd11XLCRA9TVsSAnZWagAAgDAP/jHPPp7p5mDMPk+xYR3K\nZ5f0u3P3vP+K8AIY2fYaS3o1QdkuEyIXj0cbB7QemMVAuM7z/Je0PklRaees\nLsQtil4lpwTr5hqJHX/I0hq4wp1uL08mZdPOA/7rH7sjXNvw8mkKjfPcqTXa\nhWHMmQxRNHLSv55evDcAiqN7GzrOmQzkxXmnsAC9cdUVqz62R+4qqS20GEwM\nyvx2h2wczTmaQlEELZZoP45AabSzlsbwfTe7zfipZ8e55YKYVakySLUu6OBh\nvIV8AQw/FYyAiZZGECQtKco9wWf6fyLS2f9svz23QjD/2lJlizw/Oc0gpZu3\nlwOouoaqLrb4WWSrpyis6h9iOfbLKduH4VZsxb1IClqBB7pulsPzlIxKksOp\n9QzB4gHh4jti6vwdK5RAoXygXt92JxjA0PW0hBZw6dLNTBRJCj6JJC/ze15z\nwGE9OebSTqU9tytN1zzWi9pUTD1WtLsdtPNk8efbqZMXRqqnW8UTKov2Ovvz\ndshvd9IP5hfOGaMnp5FWnjPu9kH5XtJC+akSrG2drFhYwKrwrQv0g3gggnrN\nPERvNaPSCIGZ0Z0F5wFAg8BTANH9TinrGc9HG6Z0AYZv5D80iQlAfXbRgkRg\nl//vvcjzMWxzYygesNsfQ0ryMHcAhn1M2gS8idcxHqkunB+8lclW0wXJNI7a\n3j3K\r\n=L95R\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","module":"index.js","browser":"dist/index.js","gitHead":"cb7c610ce117e6fe41168dcb3e2758d12900b277","scripts":{"docs":"npx jsdoc -c .jsdocrc.json .","test":"echo \"Error: no test specified\" && exit 1","build":"cross-env NODE_ENV=production aofl build","build-ci":"cross-env NODE_ENV=production aofl build --debug","build:dev":"cross-env NODE_ENV=development aofl build","prepublishOnly":"npm run build-ci && npm run docs"},"typings":"types.d.ts","_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"lerna/3.18.4/node@v10.16.0+x64 (darwin)","description":"A module for simplifying api calls","directories":{},"_nodeVersion":"10.16.0","_hasShrinkwrap":false,"devDependencies":{"jsdoc":"^3.6.3","@aofl/cli":"^3.1.0","cross-env":"^6.0.3","tsd-jsdoc":"^2.4.0","@aofl/cache-manager":"^3.1.0"},"peerDependencies":{"@aofl/cache-manager":">= 3.0.0-beta.1 < 4.0.0"},"_npmOperationalInternal":{"tmp":"tmp/api-request_3.1.0_1574393291252_0.038602766185023896","host":"s3://npm-registry-packages"}},"3.2.0":{"name":"@aofl/api-request","version":"3.2.0","keywords":["aofljs","@aofl/api-request","api request","api","cache response"],"author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/api-request@3.2.0","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"contributors":[{"name":"Daniel Belisle","email":"daniel.belisle@aofl.com"},{"name":"Micah Blu","email":"micah.blu@aofl.com"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"c96689ad5486c48f9a27c76fe8f9c9fef5895ba9","tarball":"https://registry.npmjs.org/@aofl/api-request/-/api-request-3.2.0.tgz","fileCount":12,"integrity":"sha512-kt4b9+atBlwdXCuEy9sDoRuKXz98PR6ir5Rrob+IeN5V21+9J9vOVATvYZ3DrxII+JQRB/MYhwkG/moP3g2xpQ==","signatures":[{"sig":"MEUCID1kPQH6aN0ax9uckHQhtxovtDuvqxAXMhcabGNqq5jLAiEA455t1HQMBoxePi3ezAAicQFmwWKVtRXRr87T05VKw3U=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":21989,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd2jKVCRA9TVsSAnZWagAAiJAP/0QlKCpLjweBhyZUhW15\ntwIuQN/eQh0agWejHUW4H+AqhbMjGUVq3hNMAwuNwH/9YoQkSf39oIxUHfLd\nLX4PibVB8LNJIoxZqqpjbcJo9RUTWWT2mYu4yI/fjRwF+rYkAg5wVUp4H8oL\nBdvAERP1SFYwIvjFoVfyoOKHDZeFb5P4zrhJX9Im6SKDKJTPbX3qxi2c5sPf\n3z+Oe6l0gsSmFmrExL776zp7C+O4QBzvk8jkpSBiVlkNqSNxv/ClLlAjAcPl\nIh3n8gVhO/TMqlKHxcLaIEPsNYqjrNS4tt3vwr+acXkMCEjOd5q1VONwOv00\nrmtkVW99NeKa6k0ybZhoqPRjRjiiVywb1IW2mXgClhShQNhzCMK3PyIOfEiQ\nLQ2qFLWl4GYkE8EkEGF9dAVEJ+J7RmF1wNPMFP8EGWwFYPFoQwzd+flZ1hMF\nRVDB1cQj5hl9bMxAzW10yJ7HAYjbk37ieS7Lo8TzglBsqwBJd/QbcvO1XEl5\nD0H3VbLj3rGvghr1LGRXNDmwQT+iiJ6TipI9yt25pcdUrgZSu8bjoMWo88p8\njOtU8yq7HTLa0qSRy379WqjO2/mhCkLJWYKtf7BR9sm1RiMK0PcVKJ17RhMf\n5ngMcsoKn6HizTPM78Rn4d3dXU7leheSQp8R43EGS59+2NESzicjWU9OmTLO\nqqdJ\r\n=1Pr4\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","module":"index.js","browser":"dist/index.js","gitHead":"8275111725390a8f797467a12e045c905a78623b","scripts":{"docs":"npx jsdoc -c .jsdocrc.json .","test":"echo \"Error: no test specified\" && exit 1","build":"cross-env NODE_ENV=production aofl build","build-ci":"cross-env NODE_ENV=production aofl build --debug","build:dev":"cross-env NODE_ENV=development aofl build","prepublishOnly":"npm run build-ci && npm run docs"},"typings":"types.d.ts","_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"lerna/3.18.4/node@v10.16.0+x64 (darwin)","description":"A module for simplifying api calls","directories":{},"_nodeVersion":"10.16.0","_hasShrinkwrap":false,"devDependencies":{"jsdoc":"^3.6.3","@aofl/cli":"^3.2.0","cross-env":"^6.0.3","tsd-jsdoc":"^2.4.0","@aofl/cache-manager":"^3.2.0"},"peerDependencies":{"@aofl/cache-manager":">= 3.0.0-beta.1 < 4.0.0"},"_npmOperationalInternal":{"tmp":"tmp/api-request_3.2.0_1574580885315_0.9572521830269272","host":"s3://npm-registry-packages"}},"3.2.1":{"name":"@aofl/api-request","version":"3.2.1","keywords":["aofljs","@aofl/api-request","api request","api","cache response"],"author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/api-request@3.2.1","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"contributors":[{"name":"Daniel Belisle","email":"daniel.belisle@aofl.com"},{"name":"Micah Blu","email":"micah.blu@aofl.com"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"7a0451b1270b530660bd68bb71c3067060157584","tarball":"https://registry.npmjs.org/@aofl/api-request/-/api-request-3.2.1.tgz","fileCount":12,"integrity":"sha512-I7qsjoBwql0y+o0weuZW0yuoyhPo9OT/lP9isCXuzvF7dqqXoz0qK/zq6FTVPiJt5Z+t1HvjtVB7OOJiKo1/5w==","signatures":[{"sig":"MEUCIG1XqFWpaZ/gZ4yyhkHV92IqjGHRd3raOw+EaGLw3CUWAiEAz0rhpjvkxxi1jvwKHGqrgDbU64qcS6Wv5Kv5peXOtX8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":21989,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd2jlkCRA9TVsSAnZWagAApQQP/RcN3ml88EpJdww/M12N\n4K7cxhqTe/p8MGastWnSX5lQwLebBhFGODMK+w/wL9UCYPBQ3NtAcrOgaVcB\nLwyJJYirSc36ksLERf3cYP4O0mzIGdfGAmBKvf5ir9EJ/lManOGX0dR7FfFi\nFBPlnBNS+FUS0nnb7S7qolAHD1tsHeqrcH4A2aXpO+HIR5lHlppr/dkGCApV\n53pkdpaUghWjyufGcUxQblJMsSGVSH4qUtXdsUDzsLCr8Zglc2IbxGAsbbsQ\nycE7l/M1O45qNTeEpblTopoPqUojpWPQ+0AMlgp8KN6kQChnkPSkH/Q5M5tZ\nlOLkqPWRki2Zaz6ZZagdn6Zeo3cqWQP9dMqWAK3kdkzuWseeI9XvZtb//vM/\nu7UJELJoyIJWdhTg2CUBZuZaP/cE2IJNlnyp1mqB5JQfBeoYF30YvGpkSdL+\nzW9lfKO9GUe/agorFyKbKYLprDiodIPcxdITRBrgfYu9QD+jDK09+yXu0LOe\njTLIPXDzWypm6KGvIuah0mKIGz51SUxSyuBsVTrnEDwqqz1KFDijmq11avf9\ndchTTNMxHXdPuwJCjRaM4tltkezGqPxAbT+MHErQLvdmbLEzbyfu25NzMx5j\nM86lQuZglxeZwgfNn5iznZ6XTVhT6ImX8VJc08Qpftze1uAmralSPA5pDHiV\nxzlT\r\n=xaAg\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","module":"index.js","browser":"dist/index.js","gitHead":"a3a91753b98e4423d9fa5bc05d8cc8f8754fd040","scripts":{"docs":"npx jsdoc -c .jsdocrc.json .","test":"echo \"Error: no test specified\" && exit 1","build":"cross-env NODE_ENV=production aofl build","build-ci":"cross-env NODE_ENV=production aofl build --debug","build:dev":"cross-env NODE_ENV=development aofl build","prepublishOnly":"npm run build-ci && npm run docs"},"typings":"types.d.ts","_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"lerna/3.18.4/node@v10.16.0+x64 (darwin)","description":"A module for simplifying api calls","directories":{},"_nodeVersion":"10.16.0","_hasShrinkwrap":false,"devDependencies":{"jsdoc":"^3.6.3","@aofl/cli":"^3.2.1","cross-env":"^6.0.3","tsd-jsdoc":"^2.4.0","@aofl/cache-manager":"^3.2.1"},"peerDependencies":{"@aofl/cache-manager":">= 3.0.0-beta.1 < 4.0.0"},"_npmOperationalInternal":{"tmp":"tmp/api-request_3.2.1_1574582628445_0.8077728424308055","host":"s3://npm-registry-packages"}},"3.2.2-alpha.2":{"name":"@aofl/api-request","version":"3.2.2-alpha.2","keywords":["aofljs","@aofl/api-request","api request","api","cache response"],"author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/api-request@3.2.2-alpha.2","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"contributors":[{"name":"Daniel Belisle","email":"daniel.belisle@aofl.com"},{"name":"Micah Blu","email":"micah.blu@aofl.com"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"d68214624e8065cb414087c3b56114471ac1a68d","tarball":"https://registry.npmjs.org/@aofl/api-request/-/api-request-3.2.2-alpha.2.tgz","fileCount":11,"integrity":"sha512-qWvjyTmxJ6xBSSI7Ipf+295cxAPbDarQ9BAL51CiPj4h2qXpXv565+U/04HiFLBF6m7xDm99fV8JAWDHGRACtg==","signatures":[{"sig":"MEUCIBn1y2LqoJH0CRUwwZemrZuRdTxy6XLTXqyUY6ZXFTAIAiEA+MlBLTFIzOGz9jqOZrhJDF+kNPDJThNjykgorbnCtso=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":20879,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeHiQ6CRA9TVsSAnZWagAA/oUQAJ58r2+snNKztTDAl5nb\ntQeQ30ZajIC0O0QonITTPYFknQfHD5IhdEUARqv78bI2cSkGW5XUvwYE/UW6\ny99c2sE1grJZ53Nei6wk2FTkfw+KcwBvqq4i8qyDSeEiCZNfy8DPm82wVojp\nUzZOEEyH9s6dKRikvt++GBGmB+DUH0+kVq6u+o0W83E8Ng096iehj2iUXnLu\n1XExCbv4ZKeyE7qlqXgJtHUkvEOTcDM9tjQCc+MtnnZw6UkoIKfPAxdIXYHq\nJLofKMGlSvz6dUKW8WUsG8LAwoy4NyrGJEuk00yG3VS25yp+h6tQQYztA88w\nYiP7UnlP4dYYKpogTJhpyADFM/R/Jj74tGuF9+Vh6JLHBmY3Z4MTQXYE8a8k\nx1ZLj9WhqioHbApTpEKpJdGpufLMK61r+UWVZqteiu2aguF4tL6Q7+XC4yUn\nKiDYCJYot8DngdwLJ06M5pYoQ3LBpg0mcNcJzJ9K8ONs/lN7SXz7IStV60+b\ndnIlHUu3mKs/OoiC0ZMq2tyVZj20Bt1nwPuacoCO1JLnoDhISa0ZISdhcrgv\nISrxviLHVvFKKtgCYgI2R3T2HccYGsJNnGg7eSLH2lG/jg++3Mk0l/2kR7uN\nNt+drOl4GijESEp2uPyEVNGbKc38s2l/Q82n7Env2Sw8bNjolPfCh2A5UDEn\nRQee\r\n=gVoy\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","module":"index.js","readme":"# @aofl/api-request\n\nA module for making api calls easier. Key features include caching responses and request/response formatters.\n\nCaching is implemented using @aofl/cache-manager and uses MemoryCache. @aofl/api-request caches the promises created by fetch api.\n\nRequest/response formatting referes to constructing a request payload and parsing the response payload. A formatter object should implement `pack()` and `unpack()` properties. `pack()` is to construct the request payload and `unpack()` is used to parse the response. Any number of formatters can be added to `apiRequestInstance` using the `addFromatter()` method. E.g. `GetFormatter`, `PostFormatter`, `CorsFormatter`, `FileUploadFormatter`, `GoogleMapsFormatter`, ....\n\n[Api Documentation](https://ageoflearning.github.io/aofl/v3.x/api-docs/module-@aofl_api-request.html)\n\n## Examples\n* [Basic Example](https://codesandbox.io/s/github/AgeOfLearning/aofl/tree/v3.0.0/aofl-js-packages/api-request/examples/simple)\n\n## Installation\n```bash\nnpm i -S @aofl/api-request\n```\n\n## Usage\n```javascript\nimport {ApiRequest} from '@aofl/api-request';\n\nclass PostFormatter {\n  static pack(payload) {\n    const headers = new Headers();\n    const body = new FormData();\n\n    if (typeof payload !== 'undefined') {\n      body.append('arguments', JSON.stringify(payload));\n    }\n\n    return {\n      method: 'POST',\n      headers,\n      body,\n      mode: 'cors',\n      credentials: 'include'\n    };\n  }\n\n  static unpack(response) {\n    return response.json()\n    .then((data) => {\n      if (data.status !== 'success') {\n        return Promise.reject(data);\n      }\n      return data;\n    });\n  }\n}\n\nconst apiRequestInstance = new ApiRequest();\napiRequestInstance.addFormatter('post', PostFormatter);\n\napiRequestInstance.request('https://example.org/', {}, 'post', true, 'sample-namespace')\n.then((jsonResponse) => {\n})\n.catch((jsonResponse) => {\n});\n```\n","browser":"dist/index.js","scripts":{"docs":"npx jsdoc -c .jsdocrc.json .","test":"echo \"Error: no test specified\" && exit 1","build":"cross-env NODE_ENV=production aofl build","build-ci":"cross-env NODE_ENV=production aofl build --debug","build:dev":"cross-env NODE_ENV=development aofl build","prepublishOnly":"npm run build-ci && npm run docs"},"typings":"types.d.ts","_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"6.12.1","description":"A module for simplifying api calls","directories":{},"_nodeVersion":"12.13.1","_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jsdoc":"^3.6.3","@aofl/cli":"^3.2.2-alpha.2","cross-env":"^6.0.3","tsd-jsdoc":"^2.4.0","@aofl/cache-manager":"^3.2.2-alpha.2"},"peerDependencies":{"@aofl/cache-manager":">= 3.0.0-beta.1 < 4.0.0"},"_npmOperationalInternal":{"tmp":"tmp/api-request_3.2.2-alpha.2_1579033658313_0.38736278801802326","host":"s3://npm-registry-packages"}},"3.2.2-alpha.3":{"name":"@aofl/api-request","version":"3.2.2-alpha.3","keywords":["aofljs","@aofl/api-request","api request","api","cache response"],"author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/api-request@3.2.2-alpha.3","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"contributors":[{"name":"Daniel Belisle","email":"daniel.belisle@aofl.com"},{"name":"Micah Blu","email":"micah.blu@aofl.com"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"8f5eb64a3f818c6e94db515c54fbf803bdfabc1e","tarball":"https://registry.npmjs.org/@aofl/api-request/-/api-request-3.2.2-alpha.3.tgz","fileCount":11,"integrity":"sha512-Ridpp5ayryFCPUZfyHMu2mZzfoiKxkJFU92aWcgCxlwA1fEQ4jYk/eUlEtjehNBsAm40kJRY7N49m1en4B6R6Q==","signatures":[{"sig":"MEUCIQDXGP6J0z3SINbjpJ/ZK/vzlEF6QGunVlZHeYeCsz6/WwIgNv52Xtk/heuRcKGyTjnXnBqscAkVJ2z/uJ2bA2Y+Sno=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":20879,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeHi7aCRA9TVsSAnZWagAAzvUP/2PacfYYOZPziWdBvCCg\nrQqDu9tpJZ0/AN+3I4ZUoWehmWVzrFC+ULweQVD75Fu7+uTuduZkXby/AI3o\ni4avnii69XRqsLynpEUApOSYA8Gh5E9TmDujHmx+BaMl/hse+MT3azD5Ad+3\nAa7b4WioTNXsPOpj9ScRhWDvkPENSlGL45XO5S/plEEsalvZH0uBMx402hqf\n/+/FsOm+1wTVHQKOMKjDathUgzfoitmmAxY1PRpnBLKJudC7uQQQG08oyL+a\nJLGyCZeHrOyMbDh4nHjYtq2Xy1QrQ0Ds2Q/UiM0AVbPnTb6LZcdfY2yzN5Sx\ns1LtsPEHBO8O+iDx4Yj2XOTyyHWiVLBF8u0xa7u/UZc2vF2UgIXkI+RyB5nN\nSJK0Tlk3HJenT0alqxQ67K57tR4s+I28Q//8Kw+jFciRArtffyPFMdqkQDOI\nq+reTnzsJWV+OsY8qPFyJ5Y1fYvWvthjIDQYo2u+iXYMmV1fwrr/qsStwKby\nVjz8vpKjqUumE1+N3uIEokzL6z2dle7PyvJP7nGln7SB7KPwYbA8BhQR1Ljj\nruHVcmx6sXgNqOSs92KUPYADwZzJTLhgG772rihq82y2G90Ka+58tmYT2ZWz\nJ/1YVtsFU5n9/FSlEiTae3zWCEsEAvYTNzBG1c6dT2/h+eYswPwkCJbaPwqW\nQgPz\r\n=GDGI\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","module":"index.js","readme":"# @aofl/api-request\n\nA module for making api calls easier. Key features include caching responses and request/response formatters.\n\nCaching is implemented using @aofl/cache-manager and uses MemoryCache. @aofl/api-request caches the promises created by fetch api.\n\nRequest/response formatting referes to constructing a request payload and parsing the response payload. A formatter object should implement `pack()` and `unpack()` properties. `pack()` is to construct the request payload and `unpack()` is used to parse the response. Any number of formatters can be added to `apiRequestInstance` using the `addFromatter()` method. E.g. `GetFormatter`, `PostFormatter`, `CorsFormatter`, `FileUploadFormatter`, `GoogleMapsFormatter`, ....\n\n[Api Documentation](https://ageoflearning.github.io/aofl/v3.x/api-docs/module-@aofl_api-request.html)\n\n## Examples\n* [Basic Example](https://codesandbox.io/s/github/AgeOfLearning/aofl/tree/v3.0.0/aofl-js-packages/api-request/examples/simple)\n\n## Installation\n```bash\nnpm i -S @aofl/api-request\n```\n\n## Usage\n```javascript\nimport {ApiRequest} from '@aofl/api-request';\n\nclass PostFormatter {\n  static pack(payload) {\n    const headers = new Headers();\n    const body = new FormData();\n\n    if (typeof payload !== 'undefined') {\n      body.append('arguments', JSON.stringify(payload));\n    }\n\n    return {\n      method: 'POST',\n      headers,\n      body,\n      mode: 'cors',\n      credentials: 'include'\n    };\n  }\n\n  static unpack(response) {\n    return response.json()\n    .then((data) => {\n      if (data.status !== 'success') {\n        return Promise.reject(data);\n      }\n      return data;\n    });\n  }\n}\n\nconst apiRequestInstance = new ApiRequest();\napiRequestInstance.addFormatter('post', PostFormatter);\n\napiRequestInstance.request('https://example.org/', {}, 'post', true, 'sample-namespace')\n.then((jsonResponse) => {\n})\n.catch((jsonResponse) => {\n});\n```\n","browser":"dist/index.js","scripts":{"docs":"npx jsdoc -c .jsdocrc.json .","test":"echo \"Error: no test specified\" && exit 1","build":"cross-env NODE_ENV=production aofl build","build-ci":"cross-env NODE_ENV=production aofl build --debug","build:dev":"cross-env NODE_ENV=development aofl build","prepublishOnly":"npm run build-ci && npm run docs"},"typings":"types.d.ts","_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"6.12.1","description":"A module for simplifying api calls","directories":{},"_nodeVersion":"12.13.1","_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jsdoc":"^3.6.3","@aofl/cli":"^3.2.2-alpha.3","cross-env":"^6.0.3","tsd-jsdoc":"^2.4.0","@aofl/cache-manager":"^3.2.2-alpha.3"},"peerDependencies":{"@aofl/cache-manager":">= 3.0.0-beta.1 < 4.0.0"},"_npmOperationalInternal":{"tmp":"tmp/api-request_3.2.2-alpha.3_1579036378083_0.0766308088473937","host":"s3://npm-registry-packages"}},"3.3.0":{"name":"@aofl/api-request","version":"3.3.0","keywords":["aofljs","@aofl/api-request","api request","api","cache response"],"author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/api-request@3.3.0","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"contributors":[{"name":"Daniel Belisle","email":"daniel.belisle@aofl.com"},{"name":"Micah Blu","email":"micah.blu@aofl.com"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"f528593f88c22ce7e5b1545b44dd68a1a74691b1","tarball":"https://registry.npmjs.org/@aofl/api-request/-/api-request-3.3.0.tgz","fileCount":11,"integrity":"sha512-oJAroAitwO9dg69rgrxrLKrRV85FLEzaS6k6Z8Yfr4t1EOPTN4x/s/ySIj/qLHRSbxy9V/413YVZNSzlsEVliA==","signatures":[{"sig":"MEUCIQD3Ibm/rv0AsqPH2tumw9qJoJnU3fopPA5eFdBmOA6onQIgL4tHStwFhJ01mAv/WuBXPM1GbU8S980X9Yd56K2118Y=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":20855,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeKNtICRA9TVsSAnZWagAASNEP/1yp0Ve9G1/MEMSHvBKQ\nRMEC6ai63o6sVQMRpWT65rLLp5BrteSwqQ15s/FKYWLFEAv96tL3axlSWlLO\neH450YHvVXiBwTsmko1T15wJ5cyvs8iSHkBbabWvRuK28ME6+9lciX8xDhEX\nespbyutZA58tEzf2mmnj3gLRYrfUVXvmiuatr3wbmHbuFzIDUgOgfWuTc81n\nykTzNIwKFS3i19WleK9e9BirkaJwbjVfBEROAKrtnh0RNfG2+yZG5hW3QQtQ\n+R4fcxB7BNSGkpslLk6q9HSLz7G838d8hDum89SxCSbUT+5iDYKDyronKnvM\nFcQvb0LadtToA3zeUYqQvxG3vrWk2Xz7utzq3ph9CmZmqyQfmZJs9vzxscBl\nnyR2ByC/3npm23fWdOJhLk4jWsZuL9ycMw4Pi70ruDGN0TAvXzASA53FX6Ua\n4JVGwzaNNYezyrc+HcxOeTyIMVd6lSQ8iXKze3CcqWUXp2FhXJfmLpQP3PBy\nDJuMB46goV0+WsEKDmQ1oAeQZlxICe4VLD2OKmypteSLyvjD6ki6Gca2WNjx\nCHXeYKYQa7tCecQGhoXt2eiZdXinjoJ6ITvdtm4rOI7b3QKeaJm2YkxDSfAL\nH+h6hEjB7WiE+oYfF7uAOaYkcgN5PafSftbk8onOMT4Hg1aiXcX4WyLfa8Bk\nGfTT\r\n=Uhci\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","module":"index.js","browser":"dist/index.js","scripts":{"docs":"npx jsdoc -c .jsdocrc.json .","test":"echo \"Error: no test specified\" && exit 1","build":"cross-env NODE_ENV=production aofl build","build-ci":"cross-env NODE_ENV=production aofl build --debug","build:dev":"cross-env NODE_ENV=development aofl build","prepublishOnly":"npm run build-ci && npm run docs"},"typings":"types.d.ts","_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"6.12.1","description":"A module for simplifying api calls","directories":{},"_nodeVersion":"12.13.1","_hasShrinkwrap":false,"devDependencies":{"jsdoc":"^3.6.3","@aofl/cli":"^3.3.0","cross-env":"^6.0.3","tsd-jsdoc":"^2.4.0","@aofl/cache-manager":"^3.3.0"},"peerDependencies":{"@aofl/cache-manager":">= 3.0.0-beta.1 < 4.0.0"},"_npmOperationalInternal":{"tmp":"tmp/api-request_3.3.0_1579735879772_0.47077500695781005","host":"s3://npm-registry-packages"}},"3.5.0-beta.1":{"name":"@aofl/api-request","version":"3.5.0-beta.1","keywords":["aofljs","@aofl/api-request","api request","api","cache response"],"author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/api-request@3.5.0-beta.1","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"contributors":[{"name":"Daniel Belisle","email":"daniel.belisle@aofl.com"},{"name":"Micah Blu","email":"micah.blu@aofl.com"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"91f89092651aec302816a429880d30969b1abe1b","tarball":"https://registry.npmjs.org/@aofl/api-request/-/api-request-3.5.0-beta.1.tgz","fileCount":8,"integrity":"sha512-meNy8SLkWSC2BmjLVvc+M70PhHb9vmZgfNQumjyNI6qCfodlD8Z4321/tqxTJZwMSfOuxT/PPLeRqacPHp25Qw==","signatures":[{"sig":"MEQCIE/Apr2I590IoYZAkXWqWoCcgtIe2VOabKrSCMM/pchfAiBDm8Sf6jH47/LxeRSuAsSGxQIKjIoGor+ouhB7+ZM0qw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":19732,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeUbiwCRA9TVsSAnZWagAA4dkQAJvf6khdhzKPyrm8qheW\nr7seOVJxZ254fKwntkKIrcqP+6DeXz3QevneXB2sPil2Uan7l1SQN/QCCkCN\nM/v/HwQGEKLxPm0fRYUEIX/swJ0BNgl6sz4rWnoN0KNh44JqavJOYkxtlxuK\ndB73BJKkpgrLoXcEzBk6WgEpUGk33mRqvy59L+fzIyEjkQ1mrRIT1FMGUPE8\nk1pGRoX5CAE6rR9ng8KN5/mqWLFIdyJee3RXS3XP/+AD81CWUwpWXfJmLu28\nuUfA24x4jSR07a16BPXGZMo/YKc4M+Z/iAwRtRyS4OxGDtq5DlF1JGZCNJT+\nW2mOrl0VJyrRPN89WM8yudlKbdjMktWcNU2zkQoEkZlc3tR65BAeVycC1bGz\nSRmCVQ0Enx1lPHSb+9pEotl03WV/PAmkQrxCIS5etV/OKoj2H5BfvCNyEGjD\noxnEf1KW/s9HEtaPzcSAiu8xWpYZOlS0wEyFuZlxpkLZnJmSnr9qZTz5UvkY\nptI+GwH++KEDwtUx6w5kjA3wOZ8Zxm5s8ehH1CN0KbsLocTAoNpZyOnHMvKN\ni0D0aKyMG7dHj9s9/d64SX0DBUg8f1ug7bpWDtzBgXV6lAb9eggPctN3Q8kc\nl+m9VLn8oX9Bu9k3iVpg99O+GGg9cSpM2tNFBBOxBvXtcnLJfqZGHaZnJGke\n5gnj\r\n=juhI\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","module":"index.js","readme":"# @aofl/api-request\n\nA module for making api calls easier. Key features include caching responses and request/response formatters.\n\nCaching is implemented using @aofl/cache-manager and uses MemoryCache. @aofl/api-request caches the promises created by fetch api.\n\nRequest/response formatting referes to constructing a request payload and parsing the response payload. A formatter object should implement `pack()` and `unpack()` properties. `pack()` is to construct the request payload and `unpack()` is used to parse the response. Any number of formatters can be added to `apiRequestInstance` using the `addFromatter()` method. E.g. `GetFormatter`, `PostFormatter`, `CorsFormatter`, `FileUploadFormatter`, `GoogleMapsFormatter`, ....\n\n[Api Documentation](https://ageoflearning.github.io/aofl/v3.x/api-docs/module-@aofl_api-request.html)\n\n## Examples\n* [Basic Example](https://codesandbox.io/s/github/AgeOfLearning/aofl/tree/v3.0.0/aofl-js-packages/api-request/examples/simple)\n\n## Installation\n```bash\nnpm i -S @aofl/api-request\n```\n\n## Usage\n```javascript\nimport {ApiRequest} from '@aofl/api-request';\n\nclass PostFormatter {\n  static pack(payload) {\n    const headers = new Headers();\n    const body = new FormData();\n\n    if (typeof payload !== 'undefined') {\n      body.append('arguments', JSON.stringify(payload));\n    }\n\n    return {\n      method: 'POST',\n      headers,\n      body,\n      mode: 'cors',\n      credentials: 'include'\n    };\n  }\n\n  static unpack(response) {\n    return response.json()\n    .then((data) => {\n      if (data.status !== 'success') {\n        return Promise.reject(data);\n      }\n      return data;\n    });\n  }\n}\n\nconst apiRequestInstance = new ApiRequest();\napiRequestInstance.addFormatter('post', PostFormatter);\n\napiRequestInstance.request('https://example.org/', {}, 'post', true, 'sample-namespace')\n.then((jsonResponse) => {\n})\n.catch((jsonResponse) => {\n});\n```\n","browser":"dist/index.js","scripts":{"docs":"npx jsdoc -c .jsdocrc.json .","test":"echo \"Error: no test specified\" && exit 1","build":"cross-env NODE_ENV=production aofl build","build-ci":"cross-env NODE_ENV=production aofl build --debug","build:dev":"cross-env NODE_ENV=development aofl build","prepublishOnly":"npm run build-ci && npm run docs"},"typings":"types.d.ts","_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"6.12.1","description":"A module for simplifying api calls","directories":{},"_nodeVersion":"12.13.1","_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jsdoc":"^3.6.3","@aofl/cli":"^3.5.0-beta.1","cross-env":"^6.0.3","tsd-jsdoc":"^2.4.0","@aofl/cache-manager":"^3.5.0-beta.1"},"peerDependencies":{"@aofl/cache-manager":">= 3.0.0-beta.1 < 4.0.0"},"_npmOperationalInternal":{"tmp":"tmp/api-request_3.5.0-beta.1_1582414000221_0.8995122041789121","host":"s3://npm-registry-packages"}},"3.5.0-beta.2":{"name":"@aofl/api-request","version":"3.5.0-beta.2","keywords":["aofljs","@aofl/api-request","api request","api","cache response"],"author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/api-request@3.5.0-beta.2","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"contributors":[{"name":"Daniel Belisle","email":"daniel.belisle@aofl.com"},{"name":"Micah Blu","email":"micah.blu@aofl.com"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"9d42430faccb03d7e020c58c1acda3ac0b1cb5cf","tarball":"https://registry.npmjs.org/@aofl/api-request/-/api-request-3.5.0-beta.2.tgz","fileCount":8,"integrity":"sha512-ASDsMBCBobLL/3XyWBRSGfXN6zFfTEAMA8s/26jcQqR/+wuXIskImIYS971cCgggn/7egCjCujpTgKrlsYhsvA==","signatures":[{"sig":"MEUCIEH3+gsI+Y5WPeUnHDFb2zmUNwbDAOE3hKaZcdERQOWIAiEA58yxjBd/t3xq3P0gCREY4zNPHmCeGs0lUsDVBbFNF1A=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":19732,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeUb7KCRA9TVsSAnZWagAAqrIP/jPAXuNXzSDSPvCF7lK3\nHexTKGM/TOhqTcCXLyCXFogTtdrQI/ALv7A2Z3WOAO1gJkWIdpFjfZO341Ro\nqEHICQDBut2CoGWwdBIqQ0pRJJjYxD36BZhkXhng44t/7m+CL/HlxGnGsUqK\nu0+hV2cKvdLXX2InGYMjPt6a3DFKNIeVO+hEb85E518AIasMHWNEXdVNRH8E\naGk6kWYIldsORpLv/GiEIpdZ/m1ye2IXffN3FVlPMXnMZPU6yHOQAR7kKGby\nk4MXwQk5yTo5fTLKGMtIl5XkmNu+fakRwWmK3D55qyEnTR6EJ1FCLVKh6MVc\njnpLaA6OpJYizW0EfbShYg6QwFeRMg2ovAFsw1GNmLrwcCjuRKRD6jNw2Gle\nDTdhElHUH2ms2mFPrOfwa0p95bLcDFTSVHwasLEeMgmr0nBJjq8SclFn7tFR\nRhwMNcv1H3sVfZbJNvS6fsLw6MCb6RTMJGesqvOcbRi8+gsgGpgtFV5vJb8f\nFiZPQdt4CkQx79VTC8jsIlZr5nOUkrqKTjbLs4ASOx5JNjDJjwGoctq2R6h1\nyfSt/fRM0C4s5ZIBd1L/WPmfts/p+WDC+e2FH1zZGRgIEwG6kBipOXKISos6\n/6ZkD2N4LG40UTxHKFTPWqhjGunmcakawj/kvVzd5VB5IzjkeGKFp0z4Vfll\n393D\r\n=/VE4\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","module":"index.js","readme":"# @aofl/api-request\n\nA module for making api calls easier. Key features include caching responses and request/response formatters.\n\nCaching is implemented using @aofl/cache-manager and uses MemoryCache. @aofl/api-request caches the promises created by fetch api.\n\nRequest/response formatting referes to constructing a request payload and parsing the response payload. A formatter object should implement `pack()` and `unpack()` properties. `pack()` is to construct the request payload and `unpack()` is used to parse the response. Any number of formatters can be added to `apiRequestInstance` using the `addFromatter()` method. E.g. `GetFormatter`, `PostFormatter`, `CorsFormatter`, `FileUploadFormatter`, `GoogleMapsFormatter`, ....\n\n[Api Documentation](https://ageoflearning.github.io/aofl/v3.x/api-docs/module-@aofl_api-request.html)\n\n## Examples\n* [Basic Example](https://codesandbox.io/s/github/AgeOfLearning/aofl/tree/v3.0.0/aofl-js-packages/api-request/examples/simple)\n\n## Installation\n```bash\nnpm i -S @aofl/api-request\n```\n\n## Usage\n```javascript\nimport {ApiRequest} from '@aofl/api-request';\n\nclass PostFormatter {\n  static pack(payload) {\n    const headers = new Headers();\n    const body = new FormData();\n\n    if (typeof payload !== 'undefined') {\n      body.append('arguments', JSON.stringify(payload));\n    }\n\n    return {\n      method: 'POST',\n      headers,\n      body,\n      mode: 'cors',\n      credentials: 'include'\n    };\n  }\n\n  static unpack(response) {\n    return response.json()\n    .then((data) => {\n      if (data.status !== 'success') {\n        return Promise.reject(data);\n      }\n      return data;\n    });\n  }\n}\n\nconst apiRequestInstance = new ApiRequest();\napiRequestInstance.addFormatter('post', PostFormatter);\n\napiRequestInstance.request('https://example.org/', {}, 'post', true, 'sample-namespace')\n.then((jsonResponse) => {\n})\n.catch((jsonResponse) => {\n});\n```\n","browser":"dist/index.js","scripts":{"docs":"npx jsdoc -c .jsdocrc.json .","test":"echo \"Error: no test specified\" && exit 1","build":"cross-env NODE_ENV=production aofl build","build-ci":"cross-env NODE_ENV=production aofl build --debug","build:dev":"cross-env NODE_ENV=development aofl build","prepublishOnly":"npm run build-ci && npm run docs"},"typings":"types.d.ts","_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"6.12.1","description":"A module for simplifying api calls","directories":{},"_nodeVersion":"12.13.1","_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jsdoc":"^3.6.3","@aofl/cli":"^3.5.0-beta.2","cross-env":"^6.0.3","tsd-jsdoc":"^2.4.0","@aofl/cache-manager":"^3.5.0-beta.2"},"peerDependencies":{"@aofl/cache-manager":">= 3.0.0-beta.1 < 4.0.0"},"_npmOperationalInternal":{"tmp":"tmp/api-request_3.5.0-beta.2_1582415561671_0.6973525550871338","host":"s3://npm-registry-packages"}},"3.5.0-beta.3":{"name":"@aofl/api-request","version":"3.5.0-beta.3","keywords":["aofljs","@aofl/api-request","api request","api","cache response"],"author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/api-request@3.5.0-beta.3","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"contributors":[{"name":"Daniel Belisle","email":"daniel.belisle@aofl.com"},{"name":"Micah Blu","email":"micah.blu@aofl.com"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"b0da316978acbf460528c28d755cc6079acc2c0b","tarball":"https://registry.npmjs.org/@aofl/api-request/-/api-request-3.5.0-beta.3.tgz","fileCount":8,"integrity":"sha512-Yx31b1dNUW8rT3FrkoU8IRjyclwfzLnQTdqWvipc90RtJ/rZ1Mj+j3BiqZ/1CNI3NMH7dPn3ZyDA6dLWwFWCqw==","signatures":[{"sig":"MEQCIFYFBYRsZwkuwaH6TgiH3Rmg19UtFHTN3pgxc+nqO1DsAiAz4f8Tes41TMTLUmh1b+UVkU1Tl+4FN1FpuHFu61Ryww==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":19732,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeUcI9CRA9TVsSAnZWagAAtxUP/29FODXrIwlQBN3IhBTJ\n7/3LbwHR0dPo7gcf0EvorKGCZGAPvgp/bf6Fgemnc0MVXKAhRfqwwMAtTB7N\ntps8YYDsHHB60qnaMirviziLkJhQFEjf7Dhq83Ycbh7+GFSbOkvzoY93sb8x\n/MzE8hkJoeIdwcZkWJjMmKUZgT1sZ8I7ehaTD1b31b686M/CLi/H9GultdWg\nCdcitbY5oVuVTA/aPXyAZ+ZEteUMmGwm69tucutfQXbLFJduhHPrkDAmJUpd\ng0ggMRzq+SxTkkbp0JXrgRco4M3G5qmpuGu+egLOTfdyzWgzMGB5ZjiRjhYp\nB9H/nrAnHntrGxrSjqlcAvToVLYm85K5hyqSGKN1fOGG6xedKhg1eG3Rf5l+\njHH0Ax3IOZOvZNrWQDSNSLf7WT+Xx8W6/AkgFqumCeOO34w5K9mL5G3OWEaj\nl8phC5Vspf+o2gRlNJRm/Sd0t2xtbcDP7Fr2QW83tJKETRzYWzAv2KGWIaAg\nCLa2D1xxU2qWtoOarbzRmNML5DeYiaVAwIRIG3uhJfvZ9y2iILhXSHfzA9GS\nzG875BRku6VzWyUsSwF0A0aHJXtNZdD5ROg0NwLPN3V8e7s7CTunA93NMp2k\nu8OI93GodeFDAtcjxVn9MwrETMW5+a8C61c03SVJsnvmx15ox1Vd/bQiLJiF\nMiHP\r\n=rIlw\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","module":"index.js","readme":"# @aofl/api-request\n\nA module for making api calls easier. Key features include caching responses and request/response formatters.\n\nCaching is implemented using @aofl/cache-manager and uses MemoryCache. @aofl/api-request caches the promises created by fetch api.\n\nRequest/response formatting referes to constructing a request payload and parsing the response payload. A formatter object should implement `pack()` and `unpack()` properties. `pack()` is to construct the request payload and `unpack()` is used to parse the response. Any number of formatters can be added to `apiRequestInstance` using the `addFromatter()` method. E.g. `GetFormatter`, `PostFormatter`, `CorsFormatter`, `FileUploadFormatter`, `GoogleMapsFormatter`, ....\n\n[Api Documentation](https://ageoflearning.github.io/aofl/v3.x/api-docs/module-@aofl_api-request.html)\n\n## Examples\n* [Basic Example](https://codesandbox.io/s/github/AgeOfLearning/aofl/tree/v3.0.0/aofl-js-packages/api-request/examples/simple)\n\n## Installation\n```bash\nnpm i -S @aofl/api-request\n```\n\n## Usage\n```javascript\nimport {ApiRequest} from '@aofl/api-request';\n\nclass PostFormatter {\n  static pack(payload) {\n    const headers = new Headers();\n    const body = new FormData();\n\n    if (typeof payload !== 'undefined') {\n      body.append('arguments', JSON.stringify(payload));\n    }\n\n    return {\n      method: 'POST',\n      headers,\n      body,\n      mode: 'cors',\n      credentials: 'include'\n    };\n  }\n\n  static unpack(response) {\n    return response.json()\n    .then((data) => {\n      if (data.status !== 'success') {\n        return Promise.reject(data);\n      }\n      return data;\n    });\n  }\n}\n\nconst apiRequestInstance = new ApiRequest();\napiRequestInstance.addFormatter('post', PostFormatter);\n\napiRequestInstance.request('https://example.org/', {}, 'post', true, 'sample-namespace')\n.then((jsonResponse) => {\n})\n.catch((jsonResponse) => {\n});\n```\n","browser":"dist/index.js","scripts":{"docs":"npx jsdoc -c .jsdocrc.json .","test":"echo \"Error: no test specified\" && exit 1","build":"cross-env NODE_ENV=production aofl build","build-ci":"cross-env NODE_ENV=production aofl build --debug","build:dev":"cross-env NODE_ENV=development aofl build","prepublishOnly":"npm run build-ci && npm run docs"},"typings":"types.d.ts","_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"6.12.1","description":"A module for simplifying api calls","directories":{},"_nodeVersion":"12.13.1","_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jsdoc":"^3.6.3","@aofl/cli":"^3.5.0-beta.3","cross-env":"^6.0.3","tsd-jsdoc":"^2.4.0","@aofl/cache-manager":"^3.5.0-beta.3"},"peerDependencies":{"@aofl/cache-manager":">= 3.0.0-beta.1 < 4.0.0"},"_npmOperationalInternal":{"tmp":"tmp/api-request_3.5.0-beta.3_1582416444890_0.08443755465185832","host":"s3://npm-registry-packages"}},"3.5.0-beta.4":{"name":"@aofl/api-request","version":"3.5.0-beta.4","keywords":["aofljs","@aofl/api-request","api request","api","cache response"],"author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/api-request@3.5.0-beta.4","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"contributors":[{"name":"Daniel Belisle","email":"daniel.belisle@aofl.com"},{"name":"Micah Blu","email":"micah.blu@aofl.com"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"e5a49062483f2290ff39bee4d628a6a3a208316f","tarball":"https://registry.npmjs.org/@aofl/api-request/-/api-request-3.5.0-beta.4.tgz","fileCount":8,"integrity":"sha512-15sysD8RKo4vY6HpAUF/JvlYwW0b1xl3n3oyX1mRnZJhgohbwFTHrmMmEFwNAiuTtfE4Z8vQMcpgTPmgwN3upw==","signatures":[{"sig":"MEYCIQCq0dfGPgiUH3LWD/bZmERnKKZVDkP5oV/Olpfez7DOPwIhAN2TrX69mq1VHyQQDlDCOPpOzjlFAZwGBQpfIr76V/EW","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":19732,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeUdwJCRA9TVsSAnZWagAA/LMP/j9UzLSR0W5cUBf4qS9K\nlYUxMkxFU1JjTrGfy8UwLO0Z9Yq/IQ61F0azQQwPT2h9y7di6tzf0g6lFxWf\nrVePbLGRvUHk+gj4pmZuh3l3qbqEYs2PBLcYYcO+Lex/dyVQUJZJhoj26ks+\n/bGzIqxv9UGgx/dJfu//pII/G6kToqqCkjj3UTgUEMb/Mki815cf1q/xykyS\ns3X4c0gVuiMLGSXC8smynqKivU+bPaWEyK6ivkfiPrATLvggDC/st6+t7EjA\n561LuhiqQPx5Tlvu7eCyfnc2z36gyUf9SQ31MBWuBaP3a5DxB9+SjtHQrPzs\n8YwyF76c+CG/h2aV6yrmg/WFHutAuz00N4zk95j0pLFBPH2s0peclWjy6PsN\n/TRrrhDomvo+OkPFZHNzTSxXpYFkZeWL9s6aWeiT1vmGnbgBOVrz0ai1j2Uz\n2lreC9DpBUVYdlzCz/GVdgPgNEMLBdJoYiR1z63zt0wwWcR1B/h80cnsNZLj\nlFn1uW+8iBLqHimACk7FAgN08PsNPlPC4Jy7PFGFyWiHKwm8lK5QQN8fwb28\n1OxlWm5UgeyXSAD+Nul5ZnZ9xg20g6HEQOVfFT0XUPR/lYXi2VqAVZy7ewzN\nqO8mYFadyYT60iQrvgxwcX5tf67UAZQFPJ8/tdH6kMGjPpmS4iFemL9mxxIm\nJcnE\r\n=PlsK\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","module":"index.js","readme":"# @aofl/api-request\n\nA module for making api calls easier. Key features include caching responses and request/response formatters.\n\nCaching is implemented using @aofl/cache-manager and uses MemoryCache. @aofl/api-request caches the promises created by fetch api.\n\nRequest/response formatting referes to constructing a request payload and parsing the response payload. A formatter object should implement `pack()` and `unpack()` properties. `pack()` is to construct the request payload and `unpack()` is used to parse the response. Any number of formatters can be added to `apiRequestInstance` using the `addFromatter()` method. E.g. `GetFormatter`, `PostFormatter`, `CorsFormatter`, `FileUploadFormatter`, `GoogleMapsFormatter`, ....\n\n[Api Documentation](https://ageoflearning.github.io/aofl/v3.x/api-docs/module-@aofl_api-request.html)\n\n## Examples\n* [Basic Example](https://codesandbox.io/s/github/AgeOfLearning/aofl/tree/v3.0.0/aofl-js-packages/api-request/examples/simple)\n\n## Installation\n```bash\nnpm i -S @aofl/api-request\n```\n\n## Usage\n```javascript\nimport {ApiRequest} from '@aofl/api-request';\n\nclass PostFormatter {\n  static pack(payload) {\n    const headers = new Headers();\n    const body = new FormData();\n\n    if (typeof payload !== 'undefined') {\n      body.append('arguments', JSON.stringify(payload));\n    }\n\n    return {\n      method: 'POST',\n      headers,\n      body,\n      mode: 'cors',\n      credentials: 'include'\n    };\n  }\n\n  static unpack(response) {\n    return response.json()\n    .then((data) => {\n      if (data.status !== 'success') {\n        return Promise.reject(data);\n      }\n      return data;\n    });\n  }\n}\n\nconst apiRequestInstance = new ApiRequest();\napiRequestInstance.addFormatter('post', PostFormatter);\n\napiRequestInstance.request('https://example.org/', {}, 'post', true, 'sample-namespace')\n.then((jsonResponse) => {\n})\n.catch((jsonResponse) => {\n});\n```\n","browser":"dist/index.js","scripts":{"docs":"npx jsdoc -c .jsdocrc.json .","test":"echo \"Error: no test specified\" && exit 1","build":"cross-env NODE_ENV=production aofl build","build-ci":"cross-env NODE_ENV=production aofl build --debug","build:dev":"cross-env NODE_ENV=development aofl build","prepublishOnly":"npm run build-ci && npm run docs"},"typings":"types.d.ts","_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"6.12.1","description":"A module for simplifying api calls","directories":{},"_nodeVersion":"12.13.1","_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jsdoc":"^3.6.3","@aofl/cli":"^3.5.0-beta.4","cross-env":"^6.0.3","tsd-jsdoc":"^2.4.0","@aofl/cache-manager":"^3.5.0-beta.4"},"peerDependencies":{"@aofl/cache-manager":">= 3.0.0-beta.1 < 4.0.0"},"_npmOperationalInternal":{"tmp":"tmp/api-request_3.5.0-beta.4_1582423049538_0.5316734081304502","host":"s3://npm-registry-packages"}},"3.5.0-beta.5":{"name":"@aofl/api-request","version":"3.5.0-beta.5","keywords":["aofljs","@aofl/api-request","api request","api","cache response"],"author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/api-request@3.5.0-beta.5","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"contributors":[{"name":"Daniel Belisle","email":"daniel.belisle@aofl.com"},{"name":"Micah Blu","email":"micah.blu@aofl.com"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"aed7e30eca42f6e3cd67f54dfad192ce525845c3","tarball":"https://registry.npmjs.org/@aofl/api-request/-/api-request-3.5.0-beta.5.tgz","fileCount":8,"integrity":"sha512-0dDOOA+du2SNljNnfPt4FLKOYrYq5Rd/FRLgqOXsei2gcUUwxumpw+5yMYVjR8y8XIhtDqoNr6EvD90AHXAheQ==","signatures":[{"sig":"MEQCIB+ZWM/KOzCThua4QpGQXOEKgqB9tHhCh6JVDkSdvjEKAiA6BnX/gNd2g8S2frAELRsD1wd+H8lSoLBLaJseWbgBIw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":19732,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeUe0PCRA9TVsSAnZWagAA6voP/3gUKirRG8f/+Pc0hZYQ\nA3A0AkhPU6+B1XlhAjaW2DmHDM6E15WPGn0KasencSj07X5NQJc8/Glk0ZV6\nig4kmbSN8eU0X9+7BL8XcppMWTBbOAoaSAvbnUfOr8mtCSHdWWNbL2aWwyD5\nf0A/ss5Pk7fxCizSRATS4ASemwJiITne7VdQAQkHR7QGT53fvQcZlyrgR7jw\nghmbzVfwjghqDUWoX9vb9cPVfJ1MR43CwvieLi0TZWeIjQfCjj0o1A92BF9z\novD9wOIJ1E0k3RNaVofebowiEk9IybBNoxMPs9lQaDm3zUdO7n7yBULSiiGZ\naEd86OkLWsCbtR06OYUbhzteizAV+1o9H4XnKU5CJIqEWGkR5NvxCnrwa+KZ\n2tQMFWmbZmh/QVhD1T/sIxa/t8fOF7IEA+3166eWWQmngBBKkmuZPaBR2cjV\nIfNbub8YP3y7J8e2phQ+sNMCtShRxgpa9tVLB80ciTC0HSAKrqYACZLgcbLr\ny9xGL2Di/rCkuVTA3rz1FQBtNH4oJkpRvZsha4j6i2WpYruWpS3mn8cuQlau\njo2cFZbV7jBDqJoMQRmYq6SHa8V/QN9Rl/VFsHc8tOWEsXpfhA8tknx/FCHv\nkoJtzqSoTsK0ABtFqkHY1nE0yTpuIePhDeTs/DmLIn+hObebJJfWfLw/fOqO\n+Itc\r\n=4zHX\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","module":"index.js","readme":"# @aofl/api-request\n\nA module for making api calls easier. Key features include caching responses and request/response formatters.\n\nCaching is implemented using @aofl/cache-manager and uses MemoryCache. @aofl/api-request caches the promises created by fetch api.\n\nRequest/response formatting referes to constructing a request payload and parsing the response payload. A formatter object should implement `pack()` and `unpack()` properties. `pack()` is to construct the request payload and `unpack()` is used to parse the response. Any number of formatters can be added to `apiRequestInstance` using the `addFromatter()` method. E.g. `GetFormatter`, `PostFormatter`, `CorsFormatter`, `FileUploadFormatter`, `GoogleMapsFormatter`, ....\n\n[Api Documentation](https://ageoflearning.github.io/aofl/v3.x/api-docs/module-@aofl_api-request.html)\n\n## Examples\n* [Basic Example](https://codesandbox.io/s/github/AgeOfLearning/aofl/tree/v3.0.0/aofl-js-packages/api-request/examples/simple)\n\n## Installation\n```bash\nnpm i -S @aofl/api-request\n```\n\n## Usage\n```javascript\nimport {ApiRequest} from '@aofl/api-request';\n\nclass PostFormatter {\n  static pack(payload) {\n    const headers = new Headers();\n    const body = new FormData();\n\n    if (typeof payload !== 'undefined') {\n      body.append('arguments', JSON.stringify(payload));\n    }\n\n    return {\n      method: 'POST',\n      headers,\n      body,\n      mode: 'cors',\n      credentials: 'include'\n    };\n  }\n\n  static unpack(response) {\n    return response.json()\n    .then((data) => {\n      if (data.status !== 'success') {\n        return Promise.reject(data);\n      }\n      return data;\n    });\n  }\n}\n\nconst apiRequestInstance = new ApiRequest();\napiRequestInstance.addFormatter('post', PostFormatter);\n\napiRequestInstance.request('https://example.org/', {}, 'post', true, 'sample-namespace')\n.then((jsonResponse) => {\n})\n.catch((jsonResponse) => {\n});\n```\n","browser":"dist/index.js","scripts":{"docs":"npx jsdoc -c .jsdocrc.json .","test":"echo \"Error: no test specified\" && exit 1","build":"cross-env NODE_ENV=production aofl build","build-ci":"cross-env NODE_ENV=production aofl build --debug","build:dev":"cross-env NODE_ENV=development aofl build","prepublishOnly":"npm run build-ci && npm run docs"},"typings":"types.d.ts","_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"6.12.1","description":"A module for simplifying api calls","directories":{},"_nodeVersion":"12.13.1","_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jsdoc":"^3.6.3","@aofl/cli":"^3.5.0-beta.5","cross-env":"^6.0.3","tsd-jsdoc":"^2.4.0","@aofl/cache-manager":"^3.5.0-beta.5"},"peerDependencies":{"@aofl/cache-manager":">= 3.0.0-beta.1 < 4.0.0"},"_npmOperationalInternal":{"tmp":"tmp/api-request_3.5.0-beta.5_1582427407541_0.09262892490490793","host":"s3://npm-registry-packages"}},"3.5.0-beta.6":{"name":"@aofl/api-request","version":"3.5.0-beta.6","keywords":["aofljs","@aofl/api-request","api request","api","cache response"],"author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/api-request@3.5.0-beta.6","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"contributors":[{"name":"Daniel Belisle","email":"daniel.belisle@aofl.com"},{"name":"Micah Blu","email":"micah.blu@aofl.com"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"62a08f944815205245a2a99982fece40ef15f3e0","tarball":"https://registry.npmjs.org/@aofl/api-request/-/api-request-3.5.0-beta.6.tgz","fileCount":8,"integrity":"sha512-EYhSfxT6USLPYwt9l+6GcmVCHlZI16uVYbZh5CEUesiYQA6s+UAI9BW/HfP3drFQ1/e+vzBugKeEs3HTcS2xnQ==","signatures":[{"sig":"MEQCICZW7mkRD5kwoeZj0YbCUeBoU4iqaVU+PDZcu7arWZs6AiAYDJ8cFsCZ6Wv8PFALCyLjFaDjDCAU4wDFs6Pa8b8Wiw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":19732,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeUe7dCRA9TVsSAnZWagAAbawP/3GSwraexEXXA+0Q70bC\n2SDh6dUQmy75qL0qJ5jdd7eoGGpjxpaYwCeS/gWBd6fPQ9uuVDhsziB5yMPO\nDbNtxfKFwmlhuYRfYGs2+KKJZXXScCW/mA4xfJgBTqfM12V9sWob1CFti6Wk\ntrfEFwSEE9dDAbyaR4nWtAJZO1kM+Sf1WyJQ/UNuAAK5Yqiqj5rECVlxjQdO\na1rII1MNUmOjZAZhkOWLb5PlduiTnjfagZ8aqEQlMAZpgHAq3Wz1flJQ7dI9\nkXmMdgD+DPnBp0i1qO9rZctqhKY9FEoAV1DUmAilr9cNJsIll/evBtB4mhBU\nL9Yyaj3NBnEJ45EnEfUxdGVMtKR375fXZZh/lnKWT0JyXej9M6UbM3U8kBXN\nzMVrtu3F/XgiqpPhGyqyqzUqKezO6tEla3gJdxQbRCZqss9ufK2uEjyXHJ5r\ndo+mlq65x/kEmeKE/IkSwdZpZ2LDZPXZn5knowQRdK02iyUg/b4LOnYuS/8Q\nQ+0puP4rib8GxEFk4p6MnFSG4QP9VpfSBk3O/LoJ1cjHZqwneRXdMRIDDYe0\nIJVbsOnjklaPqh+meO4f57Dn2nILTGTvaFgY8Zh0ebj/1zvg8+5qjdeYOhQZ\nAEMoo0GzFuKKMWaCArniSa9kNWEZyueusUy1r2hP7UVxmi4FThueqMuYruss\nq0fn\r\n=e9d6\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","module":"index.js","readme":"# @aofl/api-request\n\nA module for making api calls easier. Key features include caching responses and request/response formatters.\n\nCaching is implemented using @aofl/cache-manager and uses MemoryCache. @aofl/api-request caches the promises created by fetch api.\n\nRequest/response formatting referes to constructing a request payload and parsing the response payload. A formatter object should implement `pack()` and `unpack()` properties. `pack()` is to construct the request payload and `unpack()` is used to parse the response. Any number of formatters can be added to `apiRequestInstance` using the `addFromatter()` method. E.g. `GetFormatter`, `PostFormatter`, `CorsFormatter`, `FileUploadFormatter`, `GoogleMapsFormatter`, ....\n\n[Api Documentation](https://ageoflearning.github.io/aofl/v3.x/api-docs/module-@aofl_api-request.html)\n\n## Examples\n* [Basic Example](https://codesandbox.io/s/github/AgeOfLearning/aofl/tree/v3.0.0/aofl-js-packages/api-request/examples/simple)\n\n## Installation\n```bash\nnpm i -S @aofl/api-request\n```\n\n## Usage\n```javascript\nimport {ApiRequest} from '@aofl/api-request';\n\nclass PostFormatter {\n  static pack(payload) {\n    const headers = new Headers();\n    const body = new FormData();\n\n    if (typeof payload !== 'undefined') {\n      body.append('arguments', JSON.stringify(payload));\n    }\n\n    return {\n      method: 'POST',\n      headers,\n      body,\n      mode: 'cors',\n      credentials: 'include'\n    };\n  }\n\n  static unpack(response) {\n    return response.json()\n    .then((data) => {\n      if (data.status !== 'success') {\n        return Promise.reject(data);\n      }\n      return data;\n    });\n  }\n}\n\nconst apiRequestInstance = new ApiRequest();\napiRequestInstance.addFormatter('post', PostFormatter);\n\napiRequestInstance.request('https://example.org/', {}, 'post', true, 'sample-namespace')\n.then((jsonResponse) => {\n})\n.catch((jsonResponse) => {\n});\n```\n","browser":"dist/index.js","scripts":{"docs":"npx jsdoc -c .jsdocrc.json .","test":"echo \"Error: no test specified\" && exit 1","build":"cross-env NODE_ENV=production aofl build","build-ci":"cross-env NODE_ENV=production aofl build --debug","build:dev":"cross-env NODE_ENV=development aofl build","prepublishOnly":"npm run build-ci && npm run docs"},"typings":"types.d.ts","_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"6.12.1","description":"A module for simplifying api calls","directories":{},"_nodeVersion":"12.13.1","_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jsdoc":"^3.6.3","@aofl/cli":"^3.5.0-beta.6","cross-env":"^6.0.3","tsd-jsdoc":"^2.4.0","@aofl/cache-manager":"^3.5.0-beta.6"},"peerDependencies":{"@aofl/cache-manager":">= 3.0.0-beta.1 < 4.0.0"},"_npmOperationalInternal":{"tmp":"tmp/api-request_3.5.0-beta.6_1582427869278_0.47282419118723684","host":"s3://npm-registry-packages"}},"3.5.0-beta.7":{"name":"@aofl/api-request","version":"3.5.0-beta.7","keywords":["aofljs","@aofl/api-request","api request","api","cache response"],"author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/api-request@3.5.0-beta.7","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"contributors":[{"name":"Daniel Belisle","email":"daniel.belisle@aofl.com"},{"name":"Micah Blu","email":"micah.blu@aofl.com"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"4c3b0a428a73edc230e27e19246dee5af14a84f6","tarball":"https://registry.npmjs.org/@aofl/api-request/-/api-request-3.5.0-beta.7.tgz","fileCount":8,"integrity":"sha512-bI/a22tFs06D+8POWKv6NKoRhb/qz5EQ6BY2gKu9+hZ0yo05kT9i1AR0jGgM0dQGuqzy9h3mH+VliT1td6vRgA==","signatures":[{"sig":"MEQCIGzESg/lRHk6ZCZV/3ivTTzXItdeScWATxloZSXXrgcWAiAIg4dK/0OohovQEWlhDjmMaL6bmJkCssBgy6JJKYNu9Q==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":19732,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeUgggCRA9TVsSAnZWagAAK10P/0LnbLS9Bf3zdT7OGTbn\n3huIJiK+3DVLT850OSfiMqcA9aeiDTEullrKEn4t4F8dbNslw8a1Twi6DN5Y\nj+wJjAkzUaQiH31FzzkgjMkVbreL3V0VH8hqs5juY7hMr3R4/zPEOFBClfLZ\nUbsnt6qnRBx5nMMrXAcWGnRD0zeDgy/xy0pXUY0p8hsC69hgWYjYcwn+6UVj\nPqJeSUZpqGnEdGr458P4ECOL2QYRvlzo4PC35tUmCetPQz9VHjccbzd3MUUh\ns193CrSlq10R6Jc0QbOzTdQhVRNiMIjXG5+nFCbHSVjC4YbK19lsxA01yBzj\n5QbJAacyAcC4eldVDGbUx5hw71lhRCZ1RBhWnzKYAEOM0iOHkNAhLJUwm/1w\nkfoDR+u/DNN4YhrcirQcc+Ah2W81DVje1AJkWWuz0Twbwy46lgBsaGceR2db\nopz4IMCslDokqZkAzHRXrnCb9nSHZqZNYbGG14Pipu+Mrx/GhE5IZQ9YZ8xu\nmV/BUTo3Emk7ISGwlsNB0lYUUHcX9lrL9M4sxE2WH8kk5AZJJD2tRfhq1YJ4\nxL/gOr/5llLYuKRPxSGIk/HEB0HF+Ib/8YarpbtVSDDc7z7AZf6c5fLOsFNx\n/AD7kA9DIrGxfnk9azHI1HmSvuhy8q/yuUsJSYVcfvykqQya0qHMbSOoT0tu\nbOH+\r\n=KSOm\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","module":"index.js","readme":"# @aofl/api-request\n\nA module for making api calls easier. Key features include caching responses and request/response formatters.\n\nCaching is implemented using @aofl/cache-manager and uses MemoryCache. @aofl/api-request caches the promises created by fetch api.\n\nRequest/response formatting referes to constructing a request payload and parsing the response payload. A formatter object should implement `pack()` and `unpack()` properties. `pack()` is to construct the request payload and `unpack()` is used to parse the response. Any number of formatters can be added to `apiRequestInstance` using the `addFromatter()` method. E.g. `GetFormatter`, `PostFormatter`, `CorsFormatter`, `FileUploadFormatter`, `GoogleMapsFormatter`, ....\n\n[Api Documentation](https://ageoflearning.github.io/aofl/v3.x/api-docs/module-@aofl_api-request.html)\n\n## Examples\n* [Basic Example](https://codesandbox.io/s/github/AgeOfLearning/aofl/tree/v3.0.0/aofl-js-packages/api-request/examples/simple)\n\n## Installation\n```bash\nnpm i -S @aofl/api-request\n```\n\n## Usage\n```javascript\nimport {ApiRequest} from '@aofl/api-request';\n\nclass PostFormatter {\n  static pack(payload) {\n    const headers = new Headers();\n    const body = new FormData();\n\n    if (typeof payload !== 'undefined') {\n      body.append('arguments', JSON.stringify(payload));\n    }\n\n    return {\n      method: 'POST',\n      headers,\n      body,\n      mode: 'cors',\n      credentials: 'include'\n    };\n  }\n\n  static unpack(response) {\n    return response.json()\n    .then((data) => {\n      if (data.status !== 'success') {\n        return Promise.reject(data);\n      }\n      return data;\n    });\n  }\n}\n\nconst apiRequestInstance = new ApiRequest();\napiRequestInstance.addFormatter('post', PostFormatter);\n\napiRequestInstance.request('https://example.org/', {}, 'post', true, 'sample-namespace')\n.then((jsonResponse) => {\n})\n.catch((jsonResponse) => {\n});\n```\n","browser":"dist/index.js","scripts":{"docs":"npx jsdoc -c .jsdocrc.json .","test":"echo \"Error: no test specified\" && exit 1","build":"cross-env NODE_ENV=production aofl build","build-ci":"cross-env NODE_ENV=production aofl build --debug","build:dev":"cross-env NODE_ENV=development aofl build","prepublishOnly":"npm run build-ci && npm run docs"},"typings":"types.d.ts","_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"6.12.1","description":"A module for simplifying api calls","directories":{},"_nodeVersion":"12.13.1","_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jsdoc":"^3.6.3","@aofl/cli":"^3.5.0-beta.7","cross-env":"^6.0.3","tsd-jsdoc":"^2.4.0","@aofl/cache-manager":"^3.5.0-beta.7"},"peerDependencies":{"@aofl/cache-manager":">= 3.0.0-beta.1 < 4.0.0"},"_npmOperationalInternal":{"tmp":"tmp/api-request_3.5.0-beta.7_1582434336395_0.7311902988141876","host":"s3://npm-registry-packages"}},"3.5.0-beta.8":{"name":"@aofl/api-request","version":"3.5.0-beta.8","keywords":["aofljs","@aofl/api-request","api request","api","cache response"],"author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/api-request@3.5.0-beta.8","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"contributors":[{"name":"Daniel Belisle","email":"daniel.belisle@aofl.com"},{"name":"Micah Blu","email":"micah.blu@aofl.com"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"072f34ea0ebd56ee28aaeb03cfdc253632222332","tarball":"https://registry.npmjs.org/@aofl/api-request/-/api-request-3.5.0-beta.8.tgz","fileCount":8,"integrity":"sha512-RsYNc8m4C5U1hZX2CUfPAgAvLqqSQrY050Vc91A82nM1Vp882GOZWhcZgdrVzZtn9F1fR1/tr/I+OENL2er3IA==","signatures":[{"sig":"MEUCIQCUNS624u6uXxlIl0kYxoyMjMUEf18PWdrtbgy79nNGyAIgFcft7njmZFoJ+KISBXeQY3E8jPUMIYzhhiiQZbiwZx8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":19732,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeUgjZCRA9TVsSAnZWagAAxi4P/iXz4t0GLT480OTTwFv+\npo4S1tYGPBXqHjALlnbBRXSBHd0amQKlAVQhSM/A35JXKxbcYo/IO+mS7Has\n0wTyTOiRLZLIVhfwPOW0ckwzN54UG8P71nv3Z2wcDW9+3LnFzV+WVUW/A4io\nni3fAb6LS2j1gtX8NGkQHeJghhBbO0NHibQxO8Ea7zqPVdGaYKxZ9mh9/ZQZ\nwh6ryZ+gAPfNyXiHBhN+TrDmzicDKw2KgitrAlfCg33JrVfnNouk9Qwrm0+t\n8olE6eaysl3CHTPNfGLlbs4lMBSLtxH6EX0qit+5nAVb54SA4ZRM32JjFend\n1KoMvxX6jhy5Q9Q/InqS+sLTSTHixoG2P3ImxxotxQCVhex1rDF6h9LqYdX7\nolcPfjIAfXOl//xDzjASqOeRQFM0idY+ezfXafldgzH2yu09NIqnHUqzUeMI\nUjgqENzWDHgR1bdQgYjzqoO6v3s8SQ3uRmLF9kGduYKC9qqjzkDdBPZ94g4k\n7H8xNQG3ROgMQqAHIoaIcjaPb3YcWGv6X+C4IbxPGdD84hhvIozzxupmVDaD\n5d+tFiWk9T/Ae4m/6lpXFJyhffgLQtbNbtmI28IB7eh4uTy7VxGLZ6wnt6fk\n2rudb3ZBdRLKgAo1fUve32ATVfAGOM6917HXMq40MPfCtBP8bl26sSuX9kXs\nSWt0\r\n=oRel\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","module":"index.js","readme":"# @aofl/api-request\n\nA module for making api calls easier. Key features include caching responses and request/response formatters.\n\nCaching is implemented using @aofl/cache-manager and uses MemoryCache. @aofl/api-request caches the promises created by fetch api.\n\nRequest/response formatting referes to constructing a request payload and parsing the response payload. A formatter object should implement `pack()` and `unpack()` properties. `pack()` is to construct the request payload and `unpack()` is used to parse the response. Any number of formatters can be added to `apiRequestInstance` using the `addFromatter()` method. E.g. `GetFormatter`, `PostFormatter`, `CorsFormatter`, `FileUploadFormatter`, `GoogleMapsFormatter`, ....\n\n[Api Documentation](https://ageoflearning.github.io/aofl/v3.x/api-docs/module-@aofl_api-request.html)\n\n## Examples\n* [Basic Example](https://codesandbox.io/s/github/AgeOfLearning/aofl/tree/v3.0.0/aofl-js-packages/api-request/examples/simple)\n\n## Installation\n```bash\nnpm i -S @aofl/api-request\n```\n\n## Usage\n```javascript\nimport {ApiRequest} from '@aofl/api-request';\n\nclass PostFormatter {\n  static pack(payload) {\n    const headers = new Headers();\n    const body = new FormData();\n\n    if (typeof payload !== 'undefined') {\n      body.append('arguments', JSON.stringify(payload));\n    }\n\n    return {\n      method: 'POST',\n      headers,\n      body,\n      mode: 'cors',\n      credentials: 'include'\n    };\n  }\n\n  static unpack(response) {\n    return response.json()\n    .then((data) => {\n      if (data.status !== 'success') {\n        return Promise.reject(data);\n      }\n      return data;\n    });\n  }\n}\n\nconst apiRequestInstance = new ApiRequest();\napiRequestInstance.addFormatter('post', PostFormatter);\n\napiRequestInstance.request('https://example.org/', {}, 'post', true, 'sample-namespace')\n.then((jsonResponse) => {\n})\n.catch((jsonResponse) => {\n});\n```\n","browser":"dist/index.js","scripts":{"docs":"npx jsdoc -c .jsdocrc.json .","test":"echo \"Error: no test specified\" && exit 1","build":"cross-env NODE_ENV=production aofl build","build-ci":"cross-env NODE_ENV=production aofl build --debug","build:dev":"cross-env NODE_ENV=development aofl build","prepublishOnly":"npm run build-ci && npm run docs"},"typings":"types.d.ts","_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"6.12.1","description":"A module for simplifying api calls","directories":{},"_nodeVersion":"12.13.1","_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jsdoc":"^3.6.3","@aofl/cli":"^3.5.0-beta.8","cross-env":"^6.0.3","tsd-jsdoc":"^2.4.0","@aofl/cache-manager":"^3.5.0-beta.8"},"peerDependencies":{"@aofl/cache-manager":">= 3.0.0-beta.1 < 4.0.0"},"_npmOperationalInternal":{"tmp":"tmp/api-request_3.5.0-beta.8_1582434521421_0.4566705456243625","host":"s3://npm-registry-packages"}},"3.5.0-beta.9":{"name":"@aofl/api-request","version":"3.5.0-beta.9","keywords":["aofljs","@aofl/api-request","api request","api","cache response"],"author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/api-request@3.5.0-beta.9","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"contributors":[{"name":"Daniel Belisle","email":"daniel.belisle@aofl.com"},{"name":"Micah Blu","email":"micah.blu@aofl.com"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"fe93cee199827f7831c82224221364e11c44d981","tarball":"https://registry.npmjs.org/@aofl/api-request/-/api-request-3.5.0-beta.9.tgz","fileCount":8,"integrity":"sha512-KRmppPljLc3hnxjoEgrSxr0nQoXEofCwgSvdn2t7Jue5eM2hCyJYJS1TvC4R9wUVZeSe64g7Phe0O8vedutKLg==","signatures":[{"sig":"MEYCIQDVK5bc6xJvtq/mTWjoS8bY1gEKlGorHA3mL2dt88K/QQIhAIp3Slk13whsADLDLZnrGGkBLKrJgOBOEdE/5D2oTp28","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":19002,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeUg6UCRA9TVsSAnZWagAAc+oQAJ1T/8glzCItQ+Q9rw6a\n/AsF0irqQouW/gnkb9yW17dzVTIuILw6fihBSxc3r6hUxGaCFfdHdMU1canj\nj48LyR9MItk74mVIQBetHclvDNfSVzxuSZKCty48cjIvLz9nc67cWsEcnpJU\nayKAhqFTVC1a5HTLcBLYmHv3LFG3lD91di+Ff2yTCFa9JnU3qsxjGkg0nTS5\nIkwfBZXa9EHZS3zxcYn0xl1Pj9pkZoL1gllJsOmJF8jxWYyM8d19bTYzezS0\nbTuxne3lWezrbX4tJK/X7ossKpFptzYjR7aNJxc67jQa1jbW5n3tkmcLKhoS\n0PdrZRztuLpLFZRrYHFnl0DlA/TY4xMfhViOPeARJZaTPX4k25+Y/63cGzJQ\nJC3/u1lSnTWaDHEaVIo5sQAYDCK5RT6Y6DIQBBTCe8FTp+FaW8Cie5isEMsE\nU5L+HfbgGysOWZEwlZv0RJMET0f+zYKTWSOTWIFsZPFAyHIX93LoEVIcYuGn\nj5peoQS1NK7fIzN7DO4a4dLzpTN549Bc7FErlqu7omFaOjYjppfyD6RLjjqO\nZGV4YZ9v3tj2SlEj8juemrL1Zifuu0vqyz9o8zu70oVyh1K3PDeQWolj3eW0\nJDYv7eGpPc8Guwh40pwNND1qpPZFarhXT4l1RbgXLHdSeYH1cHGAXaaBliJX\naaCJ\r\n=lqp7\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","module":"index.js","readme":"# @aofl/api-request\n\nA module for making api calls easier. Key features include caching responses and request/response formatters.\n\nCaching is implemented using @aofl/cache-manager and uses MemoryCache. @aofl/api-request caches the promises created by fetch api.\n\nRequest/response formatting referes to constructing a request payload and parsing the response payload. A formatter object should implement `pack()` and `unpack()` properties. `pack()` is to construct the request payload and `unpack()` is used to parse the response. Any number of formatters can be added to `apiRequestInstance` using the `addFromatter()` method. E.g. `GetFormatter`, `PostFormatter`, `CorsFormatter`, `FileUploadFormatter`, `GoogleMapsFormatter`, ....\n\n[Api Documentation](https://ageoflearning.github.io/aofl/v3.x/api-docs/module-@aofl_api-request.html)\n\n## Examples\n* [Basic Example](https://codesandbox.io/s/github/AgeOfLearning/aofl/tree/v3.0.0/aofl-js-packages/api-request/examples/simple)\n\n## Installation\n```bash\nnpm i -S @aofl/api-request\n```\n\n## Usage\n```javascript\nimport {ApiRequest} from '@aofl/api-request';\n\nclass PostFormatter {\n  static pack(payload) {\n    const headers = new Headers();\n    const body = new FormData();\n\n    if (typeof payload !== 'undefined') {\n      body.append('arguments', JSON.stringify(payload));\n    }\n\n    return {\n      method: 'POST',\n      headers,\n      body,\n      mode: 'cors',\n      credentials: 'include'\n    };\n  }\n\n  static unpack(response) {\n    return response.json()\n    .then((data) => {\n      if (data.status !== 'success') {\n        return Promise.reject(data);\n      }\n      return data;\n    });\n  }\n}\n\nconst apiRequestInstance = new ApiRequest();\napiRequestInstance.addFormatter('post', PostFormatter);\n\napiRequestInstance.request('https://example.org/', {}, 'post', true, 'sample-namespace')\n.then((jsonResponse) => {\n})\n.catch((jsonResponse) => {\n});\n```\n","browser":"dist/index.js","scripts":{"docs":"npx jsdoc -c .jsdocrc.json .","test":"echo \"Error: no test specified\" && exit 1","build":"cross-env NODE_ENV=production aofl build","build-ci":"cross-env NODE_ENV=production aofl build --debug","build:dev":"cross-env NODE_ENV=development aofl build","prepublishOnly":"npm run build-ci && npm run docs"},"typings":"types.d.ts","_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"6.12.1","description":"A module for simplifying api calls","directories":{},"_nodeVersion":"12.13.1","_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jsdoc":"^3.6.3","@aofl/cli":"^3.5.0-beta.9","cross-env":"^6.0.3","tsd-jsdoc":"^2.4.0","@aofl/cache-manager":"^3.5.0-beta.9"},"peerDependencies":{"@aofl/cache-manager":">= 3.0.0-beta.1 < 4.0.0"},"_npmOperationalInternal":{"tmp":"tmp/api-request_3.5.0-beta.9_1582435987873_0.08666490285241468","host":"s3://npm-registry-packages"}},"3.5.0-beta.10":{"name":"@aofl/api-request","version":"3.5.0-beta.10","keywords":["aofljs","@aofl/api-request","api request","api","cache response"],"author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/api-request@3.5.0-beta.10","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"contributors":[{"name":"Daniel Belisle","email":"daniel.belisle@aofl.com"},{"name":"Micah Blu","email":"micah.blu@aofl.com"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"ba74fd447fcab2b0ef7e23d2a788c5593c74eb46","tarball":"https://registry.npmjs.org/@aofl/api-request/-/api-request-3.5.0-beta.10.tgz","fileCount":8,"integrity":"sha512-IMn+gKAPwMdB+esYMhUrablY23SXi9GHjRUJymn17R1zcmEScDz1uZkygyrq91FRz8DK1nSelguqHk3k61ujGg==","signatures":[{"sig":"MEQCIDNgjBXcbFLuwaRyg9JcXmKJDreoSYKB9/BuRPG8aj9sAiAS2v5BgLSfTPLdF792Def36CfnjQsRxcS8lkmNLnXMhQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":28211,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeUhKmCRA9TVsSAnZWagAAjo8P/2PWWi9jgVShm3VajVer\n4otuQup4vuKoVxLhM8Low2EWwBdgKFW1I1D142GJ3N+uLNdtHqnTpjcEd2zx\nuNWm6eTaFjd1/+Oj8ulKPrpiWBhAemj59ua+olZqTDXmoukTj188wK5qtH7K\nhukVFaMdWtZehw3xboUivmM6N99glH1D4snlf/iBoElg3RIfKnBjtR1tSvSZ\nx9pE9LaKXB98LYajwKrSlaBeOM/USDE62SWJjvIEJUWuR2rV/OD8LJ98JUK1\n/2D3dOp/nAUKO5nzvIxfhkPmbkHfPY2QsiTUaOdSAFqMB9fWEH6uMchL5fkw\nZiDlKOeJO2r81l3N4c0G1kReAyVRwF5sOmqoQfNM1sYjYsymC7+xjmBkTuGZ\nKqbmQ5eM02NmRla7UTcvkqYOxY2N+I9KhUn0woDc3sZNDIetUjO/6dFnV84f\nStltJ81h0Fmns3CP6yLjWiXKqQ2J0T1IQfkQ83Xrhl3BYPwi3YN+cnuf0Y33\nDe7RtN4YkXKQ6LjWSnHw3IWIoKFZjmXHVkkwNuI77YM73x8B4NzqaUgkvIve\nyw8EaZhcrbQTiOFq6R9A14XLWu2+9PcXq4iimh5WSs1rzhnV3OC1aKVdF5XO\nTTABebvUwNazJGhoklxvxmPhgSxPs7fF4K38GD/a6I8Cg648BgDz5aKdN5Pj\nlQfn\r\n=P02o\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","module":"index.js","readme":"# @aofl/api-request\n\nA module for making api calls easier. Key features include caching responses and request/response formatters.\n\nCaching is implemented using @aofl/cache-manager and uses MemoryCache. @aofl/api-request caches the promises created by fetch api.\n\nRequest/response formatting referes to constructing a request payload and parsing the response payload. A formatter object should implement `pack()` and `unpack()` properties. `pack()` is to construct the request payload and `unpack()` is used to parse the response. Any number of formatters can be added to `apiRequestInstance` using the `addFromatter()` method. E.g. `GetFormatter`, `PostFormatter`, `CorsFormatter`, `FileUploadFormatter`, `GoogleMapsFormatter`, ....\n\n[Api Documentation](https://ageoflearning.github.io/aofl/v3.x/api-docs/module-@aofl_api-request.html)\n\n## Examples\n* [Basic Example](https://codesandbox.io/s/github/AgeOfLearning/aofl/tree/v3.0.0/aofl-js-packages/api-request/examples/simple)\n\n## Installation\n```bash\nnpm i -S @aofl/api-request\n```\n\n## Usage\n```javascript\nimport {ApiRequest} from '@aofl/api-request';\n\nclass PostFormatter {\n  static pack(payload) {\n    const headers = new Headers();\n    const body = new FormData();\n\n    if (typeof payload !== 'undefined') {\n      body.append('arguments', JSON.stringify(payload));\n    }\n\n    return {\n      method: 'POST',\n      headers,\n      body,\n      mode: 'cors',\n      credentials: 'include'\n    };\n  }\n\n  static unpack(response) {\n    return response.json()\n    .then((data) => {\n      if (data.status !== 'success') {\n        return Promise.reject(data);\n      }\n      return data;\n    });\n  }\n}\n\nconst apiRequestInstance = new ApiRequest();\napiRequestInstance.addFormatter('post', PostFormatter);\n\napiRequestInstance.request('https://example.org/', {}, 'post', true, 'sample-namespace')\n.then((jsonResponse) => {\n})\n.catch((jsonResponse) => {\n});\n```\n","browser":"dist/index.js","scripts":{"docs":"npx jsdoc -c .jsdocrc.json .","test":"echo \"Error: no test specified\" && exit 1","build":"cross-env NODE_ENV=production aofl build","build-ci":"cross-env NODE_ENV=production aofl build --debug","build:dev":"cross-env NODE_ENV=development aofl build","prepublishOnly":"npm run build-ci && npm run docs"},"typings":"types.d.ts","_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"6.12.1","description":"A module for simplifying api calls","directories":{},"_nodeVersion":"12.13.1","_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jsdoc":"^3.6.3","@aofl/cli":"^3.5.0-beta.10","cross-env":"^6.0.3","tsd-jsdoc":"^2.4.0","@aofl/cache-manager":"^3.5.0-beta.10"},"peerDependencies":{"@aofl/cache-manager":">= 3.0.0-beta.1 < 4.0.0"},"_npmOperationalInternal":{"tmp":"tmp/api-request_3.5.0-beta.10_1582437029759_0.05996296747800223","host":"s3://npm-registry-packages"}},"3.5.0-beta.11":{"name":"@aofl/api-request","version":"3.5.0-beta.11","keywords":["aofljs","@aofl/api-request","api request","api","cache response"],"author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/api-request@3.5.0-beta.11","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"contributors":[{"name":"Daniel Belisle","email":"daniel.belisle@aofl.com"},{"name":"Micah Blu","email":"micah.blu@aofl.com"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"c60343395e8c92b627ac4941ccd82b9f99463bcc","tarball":"https://registry.npmjs.org/@aofl/api-request/-/api-request-3.5.0-beta.11.tgz","fileCount":8,"integrity":"sha512-biYI6nt+9HPfnEK+ee1azE5yJ2/xNvuLZzRPfWeQ+tUldncIP8vTbBbkZ4KTamqONM6GCBYMfnaTNKV3PtxR0w==","signatures":[{"sig":"MEYCIQDqYttrvub5DKzu7ZBfG5HTDZcLnK7V+l/+kv6s/i0LGgIhAJ9Nhh6iuuc36iVOnNqdmkOisc7tmhIPphCzP+OQu5Nl","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":28211,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeUiutCRA9TVsSAnZWagAA2R8P+wVeqPuz+BPII5fQPygt\njQwlzyqy0skxjYHqOF8Hkq0pVVkAtyy+ihf0Ga+tfzuJVPKMaJAW9AWQ4R/8\nN9OMOoAStEBkeQI0BR5MhZ73SUp9pfpP73nWA+fkbUvOoD9k3jAF1DdXkwIR\nPil6GdWSWLijvgQoT86w3GpH7j/KvyA1XvauHYeQHbo1GRzldjvtXzgW+zcv\ndfzN8YodqShqp7MlaBBQtht6Fv3oiQLNv+WUa2QOlY25eJOKW5zOVhoauy/7\nqN33BuogYJm2loVKE6emWnzbxpWPAgTVLG0HpTamr8gBe5N4DbYNoX7DqDLe\nFV3Or1by1Wl9LBEhLtsyczyuqm5Lls2S/7lnt2YmFUxOlQZWU/jPHh/UdYf7\nn6tSMg/07/snUky5qykmdxAYMTQ6Ul6iVgKYih09jzoTiUWZ9B0yK5C+8xBs\nykwU2+En77ItEANaSCBwNUnu+GeW6L40DbW/WFnPAgsG791FjcofhNLPablc\nDbdQGkTy7sbVF31nSJ3s2VqnK1ctLIy/vP9NKN+RfSs91l9vFCCjLtapmi7c\nICHRl8yqHMkKKBqoZUgQA4P+Sa+21HnP5gmVNlfX6dFzNVmQqvWkMLKqvFy5\nOTGItekJfqQjHHN9jmV3H9teJ0IBci/htG+dv5/ZKlvj+Xac5WQalT31Qlfp\nKYfD\r\n=T0vG\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","module":"index.js","readme":"# @aofl/api-request\n\nA module for making api calls easier. Key features include caching responses and request/response formatters.\n\nCaching is implemented using @aofl/cache-manager and uses MemoryCache. @aofl/api-request caches the promises created by fetch api.\n\nRequest/response formatting referes to constructing a request payload and parsing the response payload. A formatter object should implement `pack()` and `unpack()` properties. `pack()` is to construct the request payload and `unpack()` is used to parse the response. Any number of formatters can be added to `apiRequestInstance` using the `addFromatter()` method. E.g. `GetFormatter`, `PostFormatter`, `CorsFormatter`, `FileUploadFormatter`, `GoogleMapsFormatter`, ....\n\n[Api Documentation](https://ageoflearning.github.io/aofl/v3.x/api-docs/module-@aofl_api-request.html)\n\n## Examples\n* [Basic Example](https://codesandbox.io/s/github/AgeOfLearning/aofl/tree/v3.0.0/aofl-js-packages/api-request/examples/simple)\n\n## Installation\n```bash\nnpm i -S @aofl/api-request\n```\n\n## Usage\n```javascript\nimport {ApiRequest} from '@aofl/api-request';\n\nclass PostFormatter {\n  static pack(payload) {\n    const headers = new Headers();\n    const body = new FormData();\n\n    if (typeof payload !== 'undefined') {\n      body.append('arguments', JSON.stringify(payload));\n    }\n\n    return {\n      method: 'POST',\n      headers,\n      body,\n      mode: 'cors',\n      credentials: 'include'\n    };\n  }\n\n  static unpack(response) {\n    return response.json()\n    .then((data) => {\n      if (data.status !== 'success') {\n        return Promise.reject(data);\n      }\n      return data;\n    });\n  }\n}\n\nconst apiRequestInstance = new ApiRequest();\napiRequestInstance.addFormatter('post', PostFormatter);\n\napiRequestInstance.request('https://example.org/', {}, 'post', true, 'sample-namespace')\n.then((jsonResponse) => {\n})\n.catch((jsonResponse) => {\n});\n```\n","browser":"dist/index.js","scripts":{"docs":"npx jsdoc -c .jsdocrc.json .","test":"echo \"Error: no test specified\" && exit 1","build":"cross-env NODE_ENV=production aofl build","build-ci":"cross-env NODE_ENV=production aofl build --debug","build:dev":"cross-env NODE_ENV=development aofl build","prepublishOnly":"npm run build-ci && npm run docs"},"typings":"types.d.ts","_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"6.12.1","description":"A module for simplifying api calls","directories":{},"_nodeVersion":"12.13.1","_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jsdoc":"^3.6.3","@aofl/cli":"^3.5.0-beta.11","cross-env":"^6.0.3","tsd-jsdoc":"^2.4.0","@aofl/cache-manager":"^3.5.0-beta.11"},"peerDependencies":{"@aofl/cache-manager":">= 3.0.0-beta.1 < 4.0.0"},"_npmOperationalInternal":{"tmp":"tmp/api-request_3.5.0-beta.11_1582443437526_0.8647279584018197","host":"s3://npm-registry-packages"}},"3.5.0-beta.12":{"name":"@aofl/api-request","version":"3.5.0-beta.12","keywords":["aofljs","@aofl/api-request","api request","api","cache response"],"author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/api-request@3.5.0-beta.12","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"contributors":[{"name":"Daniel Belisle","email":"daniel.belisle@aofl.com"},{"name":"Micah Blu","email":"micah.blu@aofl.com"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"c870b11c3186be199109d169d83d868b4d70d9fe","tarball":"https://registry.npmjs.org/@aofl/api-request/-/api-request-3.5.0-beta.12.tgz","fileCount":8,"integrity":"sha512-PMXdmNqxOnlJUe1P6WGexFI9xBOrHurvMX96wVdAGY/LZDJya+2UMioR3EkBveEjEu91UNW5IEbWzk/+E5OKoA==","signatures":[{"sig":"MEUCIAzxNpvt4K7/FGpEPMH7wiXqK5JXr2tm01SvDdDWQzNyAiEAwGB5PpuuLEsURf7imHY3coh9Gvqnoa38NxXuqE5sLPY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":28211,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeUj8dCRA9TVsSAnZWagAAaFkP/3swslsVPixTmyjVgsM0\necHCL6q6qpUwhnk29uAMzAedMEs6wVgf47+CMvhoA+ceWtPzKRCqjjXcOm1Q\n0NQ9DODoAV5MmyvUcSj1vm0D8WVu5SbwLOufQvyCMDo/bPg8bi64nV0sn6k7\naDvwIOBhqqL7isbUtGHaseslkhx/yzvQydcbBVaViZ1bbOmCPB4M6A894GnS\nrbT+ZciHwZs7twFdSNlyBtyUHEIhwwytAe/OvX+u9TRLXETpId67n9WnF0sv\njv1xoj5nSCG0ga0RdhDDnceQd+bGoEutiLV1Ed2mUP3M4LJFD3mlpbE3zgXq\nOfyCPWDzIhTswU0zUovfeglWA6DCFDgbfqhq01FJguJoejztEU/4FF8itaMO\nfciD1dj+SLtP2SWbWyWrqEq+glXPYryCmdtj2npX2VwwAfum8EY4dkM0EHj8\n2WCdZGrrR1qO4hZnTUDs6Fd8DXVnHU/LvBYcBa3KPdk8V7LwTfuH/597DBVF\niYmoQ4efN2dXi76Opachrghj0OF/p+Vq4ZAOqtm8BwcO+UuuRjC0fKXOEgzF\n9VkHZ8u0F0IyW/cETBebgC+X7cv5Y66461YKrUWLFtrdUmCjteK3hkeIZj6i\nquLYM2bH9CInT3NKZe3ne3a98wSyOPMrN7urCuLzyMhux9vl6oNHOvgmSIDt\nESOy\r\n=5bN0\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","module":"index.js","readme":"# @aofl/api-request\n\nA module for making api calls easier. Key features include caching responses and request/response formatters.\n\nCaching is implemented using @aofl/cache-manager and uses MemoryCache. @aofl/api-request caches the promises created by fetch api.\n\nRequest/response formatting referes to constructing a request payload and parsing the response payload. A formatter object should implement `pack()` and `unpack()` properties. `pack()` is to construct the request payload and `unpack()` is used to parse the response. Any number of formatters can be added to `apiRequestInstance` using the `addFromatter()` method. E.g. `GetFormatter`, `PostFormatter`, `CorsFormatter`, `FileUploadFormatter`, `GoogleMapsFormatter`, ....\n\n[Api Documentation](https://ageoflearning.github.io/aofl/v3.x/api-docs/module-@aofl_api-request.html)\n\n## Examples\n* [Basic Example](https://codesandbox.io/s/github/AgeOfLearning/aofl/tree/v3.0.0/aofl-js-packages/api-request/examples/simple)\n\n## Installation\n```bash\nnpm i -S @aofl/api-request\n```\n\n## Usage\n```javascript\nimport {ApiRequest} from '@aofl/api-request';\n\nclass PostFormatter {\n  static pack(payload) {\n    const headers = new Headers();\n    const body = new FormData();\n\n    if (typeof payload !== 'undefined') {\n      body.append('arguments', JSON.stringify(payload));\n    }\n\n    return {\n      method: 'POST',\n      headers,\n      body,\n      mode: 'cors',\n      credentials: 'include'\n    };\n  }\n\n  static unpack(response) {\n    return response.json()\n    .then((data) => {\n      if (data.status !== 'success') {\n        return Promise.reject(data);\n      }\n      return data;\n    });\n  }\n}\n\nconst apiRequestInstance = new ApiRequest();\napiRequestInstance.addFormatter('post', PostFormatter);\n\napiRequestInstance.request('https://example.org/', {}, 'post', true, 'sample-namespace')\n.then((jsonResponse) => {\n})\n.catch((jsonResponse) => {\n});\n```\n","browser":"dist/index.js","scripts":{"docs":"npx jsdoc -c .jsdocrc.json .","test":"echo \"Error: no test specified\" && exit 1","build":"cross-env NODE_ENV=production aofl build","build-ci":"cross-env NODE_ENV=production aofl build --debug","build:dev":"cross-env NODE_ENV=development aofl build","prepublishOnly":"npm run build-ci && npm run docs"},"typings":"types.d.ts","_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"6.12.1","description":"A module for simplifying api calls","directories":{},"_nodeVersion":"12.13.1","_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jsdoc":"^3.6.3","@aofl/cli":"^3.5.0-beta.12","cross-env":"^6.0.3","tsd-jsdoc":"^2.4.0","@aofl/cache-manager":"^3.5.0-beta.12"},"peerDependencies":{"@aofl/cache-manager":">= 3.0.0-beta.1 < 4.0.0"},"_npmOperationalInternal":{"tmp":"tmp/api-request_3.5.0-beta.12_1582448413232_0.24233139666931924","host":"s3://npm-registry-packages"}},"3.5.0-beta.13":{"name":"@aofl/api-request","version":"3.5.0-beta.13","keywords":["aofljs","@aofl/api-request","api request","api","cache response"],"author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/api-request@3.5.0-beta.13","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"contributors":[{"name":"Daniel Belisle","email":"daniel.belisle@aofl.com"},{"name":"Micah Blu","email":"micah.blu@aofl.com"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"66cf862865127bcc91043b7e7f4a7c26ce4fd926","tarball":"https://registry.npmjs.org/@aofl/api-request/-/api-request-3.5.0-beta.13.tgz","fileCount":8,"integrity":"sha512-8XBJ1B1nIY6u5sAh7HjnFzn2sPKnxGRmjI/jyHeAZuuyg9QL41oAtPkLFFXDh6vbSPAIyfpylKCtdCDhdhsxCA==","signatures":[{"sig":"MEUCIDtvcFbDc6mO1zMvVulDXUnw127zF/BTiqUCrq2xrJ9bAiEA3TdYjEviLW0c6LU/6ZvVEau3fxGMo41/irouyMRBtwk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":28211,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeUj+VCRA9TVsSAnZWagAA6ckQAIqJGodgzMulaDycsa/O\noOkh3K084UQr/XkOwVPO5kwppOK0nwsBhMf/4T6ZK09ot11bDPEQNQFdhY2s\n0brqJLBhU3IFfIpEgn/TDMeWrwAI2gcqT3wcC/eOEkdNOqk2XAiEddvGu/+/\ntUiw1xTk73JPWNWpXXlFcDV99u8eys2rf7ftUQOxpe+Y3iam9XcYodOVfVvP\nU/FbWbCT2/gcH0RBZc+HhjLYc+xR+JMV2zXdHaU2d9Py9ILsZCYVTAEjuWYX\nuJNFfsfij8O2aYPmLdkFAMYNhDSj6R8vSjAYNfxBRHPTYhenjcXRvxXVTkYK\nG8Bus3S5kqeO1eK/n+ev/vlwQSxfwp8J/nkHEBZBgLbRtRgIwT/0Agu5q5bA\nAWW4PMqBW42++KVXnItygeezJpl95Kuzf6e0vydGcVvr9s45Jb+0CtVWgcu3\nvpj5xG381uVag4t/LqtIKyEvvVcE9zE6nozSfzsaUdpFPNhnk/HHRmPRznFt\n4ljp107YRUNeuU+d0AiJnVQs+Q4KlzB6jd0Iypb+/20+QVrf+blurgB+AAvo\nlokK/6tSc4Qi2zp1VSrRyNanvT3ZwLscS+Z48KeLT4MHApgsdZMkjL84izo3\nmW3NPFlCChQELfe7u/eJ8IAjX56RE//UkV03W8sDIngDdTg53b4tHIb1pxwD\n8mts\r\n=VGWN\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","module":"index.js","readme":"# @aofl/api-request\n\nA module for making api calls easier. Key features include caching responses and request/response formatters.\n\nCaching is implemented using @aofl/cache-manager and uses MemoryCache. @aofl/api-request caches the promises created by fetch api.\n\nRequest/response formatting referes to constructing a request payload and parsing the response payload. A formatter object should implement `pack()` and `unpack()` properties. `pack()` is to construct the request payload and `unpack()` is used to parse the response. Any number of formatters can be added to `apiRequestInstance` using the `addFromatter()` method. E.g. `GetFormatter`, `PostFormatter`, `CorsFormatter`, `FileUploadFormatter`, `GoogleMapsFormatter`, ....\n\n[Api Documentation](https://ageoflearning.github.io/aofl/v3.x/api-docs/module-@aofl_api-request.html)\n\n## Examples\n* [Basic Example](https://codesandbox.io/s/github/AgeOfLearning/aofl/tree/v3.0.0/aofl-js-packages/api-request/examples/simple)\n\n## Installation\n```bash\nnpm i -S @aofl/api-request\n```\n\n## Usage\n```javascript\nimport {ApiRequest} from '@aofl/api-request';\n\nclass PostFormatter {\n  static pack(payload) {\n    const headers = new Headers();\n    const body = new FormData();\n\n    if (typeof payload !== 'undefined') {\n      body.append('arguments', JSON.stringify(payload));\n    }\n\n    return {\n      method: 'POST',\n      headers,\n      body,\n      mode: 'cors',\n      credentials: 'include'\n    };\n  }\n\n  static unpack(response) {\n    return response.json()\n    .then((data) => {\n      if (data.status !== 'success') {\n        return Promise.reject(data);\n      }\n      return data;\n    });\n  }\n}\n\nconst apiRequestInstance = new ApiRequest();\napiRequestInstance.addFormatter('post', PostFormatter);\n\napiRequestInstance.request('https://example.org/', {}, 'post', true, 'sample-namespace')\n.then((jsonResponse) => {\n})\n.catch((jsonResponse) => {\n});\n```\n","browser":"dist/index.js","scripts":{"docs":"npx jsdoc -c .jsdocrc.json .","test":"echo \"Error: no test specified\" && exit 1","build":"cross-env NODE_ENV=production aofl build","build-ci":"cross-env NODE_ENV=production aofl build --debug","build:dev":"cross-env NODE_ENV=development aofl build","prepublishOnly":"npm run build-ci && npm run docs"},"typings":"types.d.ts","_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"6.12.1","description":"A module for simplifying api calls","directories":{},"_nodeVersion":"12.13.1","_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jsdoc":"^3.6.3","@aofl/cli":"^3.5.0-beta.13","cross-env":"^6.0.3","tsd-jsdoc":"^2.4.0","@aofl/cache-manager":"^3.5.0-beta.13"},"peerDependencies":{"@aofl/cache-manager":">= 3.0.0-beta.1 < 4.0.0"},"_npmOperationalInternal":{"tmp":"tmp/api-request_3.5.0-beta.13_1582448533096_0.45508251136130284","host":"s3://npm-registry-packages"}},"3.5.0-beta.14":{"name":"@aofl/api-request","version":"3.5.0-beta.14","keywords":["aofljs","@aofl/api-request","api request","api","cache response"],"author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/api-request@3.5.0-beta.14","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"contributors":[{"name":"Daniel Belisle","email":"daniel.belisle@aofl.com"},{"name":"Micah Blu","email":"micah.blu@aofl.com"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"4a12dfbff0037be6d34c01d6f6c6d526cc3efa76","tarball":"https://registry.npmjs.org/@aofl/api-request/-/api-request-3.5.0-beta.14.tgz","fileCount":8,"integrity":"sha512-kWyWRbRAkPxCRa9AkIcwZvl49hj/NH39mKjyU/MvOdqhYmcT/wt34/o6rvcMhnDyX/Yixm0fJo68/oJZ1orffg==","signatures":[{"sig":"MEQCIFH4R2yHNkdWwX9r/enGDQ4xlx1P9NG2QGf9d5d+HrYwAiAHsPgTm1qwCReFNTIYq59Tppgy5UIIa4rJZReawmZl9A==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":28211,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeUk0tCRA9TVsSAnZWagAAlFsP/j5Uqs64mJF7p4eAug5M\nUbr18pCO6msL3jKrqfen7uB96Pge+cFZDmsPkvILTClpMqfL31Kfj6hcMCA6\nN0EqH+rN5JT4RreBlhRf9Ta2xIp7sdqQTZscrBl+0MQvnbq5MOM5kNkpODyh\nu7ncnZGGP+TNJ4FaM9GGosUDwYVzEML/hu5YNdwsSWq34+/zeL8EOPgWXReR\n4gIwSz2oFj2qNeLnXrRXj9RYTHNG+bDnGfeiLIh29y8mQUyrFtOWUryvUb/x\nEkKF+C7fVozhlHQ3FoK8Z8ChXr33dkcV6pC1ubr8fOhJ6HWM9QgDkGfWi3Xx\npjRKlnbdI3E4IqTO6oSYd1JZlumzKPAKpbjSsWS0oMxO3oW1Nm7y0b9yBpPk\nb9B2IsaGXdNs9kwocpYQhGkwBh712tQ3+StOr0C/xLUY/jxmmNlhj4i4C5kW\n0s9Za7yu/DUUyLRug+IJ6l0F0+xqcgvri12bTEc6zdioUCcxltKRBoUYc3l8\n6pN2G2Wg/RfT+Cdqfz65iy4TFfwWhY0L8t+xSraQfCGbR7Y3PKy7DQrpcG0+\neK2dswRunEyYYzMwT3vPOtMtcPGWlxPWVzQ07eKlleIZrCVV74hwCwVt10U8\n8a+jT0cvqMZu5isBZllxtEbv7c0h6HXWfb4N8TvQ96hWohnKT0v1Ao/iaKqB\nqSYM\r\n=WPV4\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","module":"index.js","readme":"# @aofl/api-request\n\nA module for making api calls easier. Key features include caching responses and request/response formatters.\n\nCaching is implemented using @aofl/cache-manager and uses MemoryCache. @aofl/api-request caches the promises created by fetch api.\n\nRequest/response formatting referes to constructing a request payload and parsing the response payload. A formatter object should implement `pack()` and `unpack()` properties. `pack()` is to construct the request payload and `unpack()` is used to parse the response. Any number of formatters can be added to `apiRequestInstance` using the `addFromatter()` method. E.g. `GetFormatter`, `PostFormatter`, `CorsFormatter`, `FileUploadFormatter`, `GoogleMapsFormatter`, ....\n\n[Api Documentation](https://ageoflearning.github.io/aofl/v3.x/api-docs/module-@aofl_api-request.html)\n\n## Examples\n* [Basic Example](https://codesandbox.io/s/github/AgeOfLearning/aofl/tree/v3.0.0/aofl-js-packages/api-request/examples/simple)\n\n## Installation\n```bash\nnpm i -S @aofl/api-request\n```\n\n## Usage\n```javascript\nimport {ApiRequest} from '@aofl/api-request';\n\nclass PostFormatter {\n  static pack(payload) {\n    const headers = new Headers();\n    const body = new FormData();\n\n    if (typeof payload !== 'undefined') {\n      body.append('arguments', JSON.stringify(payload));\n    }\n\n    return {\n      method: 'POST',\n      headers,\n      body,\n      mode: 'cors',\n      credentials: 'include'\n    };\n  }\n\n  static unpack(response) {\n    return response.json()\n    .then((data) => {\n      if (data.status !== 'success') {\n        return Promise.reject(data);\n      }\n      return data;\n    });\n  }\n}\n\nconst apiRequestInstance = new ApiRequest();\napiRequestInstance.addFormatter('post', PostFormatter);\n\napiRequestInstance.request('https://example.org/', {}, 'post', true, 'sample-namespace')\n.then((jsonResponse) => {\n})\n.catch((jsonResponse) => {\n});\n```\n","browser":"dist/index.js","scripts":{"docs":"npx jsdoc -c .jsdocrc.json .","test":"echo \"Error: no test specified\" && exit 1","build":"cross-env NODE_ENV=production aofl build","build-ci":"cross-env NODE_ENV=production aofl build --debug","build:dev":"cross-env NODE_ENV=development aofl build","prepublishOnly":"npm run build-ci && npm run docs"},"typings":"types.d.ts","_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"6.12.1","description":"A module for simplifying api calls","directories":{},"_nodeVersion":"12.13.1","_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jsdoc":"^3.6.3","@aofl/cli":"^3.5.0-beta.14","cross-env":"^6.0.3","tsd-jsdoc":"^2.4.0","@aofl/cache-manager":"^3.5.0-beta.14"},"peerDependencies":{"@aofl/cache-manager":">= 3.0.0-beta.1 < 4.0.0"},"_npmOperationalInternal":{"tmp":"tmp/api-request_3.5.0-beta.14_1582452012851_0.958628116851006","host":"s3://npm-registry-packages"}},"3.5.0-beta.15":{"name":"@aofl/api-request","version":"3.5.0-beta.15","keywords":["aofljs","@aofl/api-request","api request","api","cache response"],"author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/api-request@3.5.0-beta.15","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"contributors":[{"name":"Daniel Belisle","email":"daniel.belisle@aofl.com"},{"name":"Micah Blu","email":"micah.blu@aofl.com"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"ba60c05368b30475cfe302eafc4a391e1dc2bd02","tarball":"https://registry.npmjs.org/@aofl/api-request/-/api-request-3.5.0-beta.15.tgz","fileCount":8,"integrity":"sha512-2oi3L5kyGqkd98CNQBOuwNodHxyBzi8V/KiUC7Pl7EcdsJxH1bfa21XCcWYZwMtyfZpqRIdlwppc2rg3+cGMRg==","signatures":[{"sig":"MEUCIQDTkP2HiDRZ8tzMi95Kgn1M5aFFgQtk/ESEKVMbAI92cgIgONDjsGT6GjwpaSr0DKIq2rgFd6dg8AcUnlzVushedxA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":28211,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeUma/CRA9TVsSAnZWagAAAqUP/A9ZBhV1etqIUMoqjoOu\nC1vIpEeh1XHC7XhsyZTxoEGlMTu6k0UuDbL4cySDbzLiJmMHh3hokqCF45k5\nUcZ7lK/WWbBtyhyljDGNzoxVeSFCizwXyKaDIOev8mKLW+7BnH+pqk9XW4uF\nMoiTRN/lETu7qojIWM411AqriE59k1nUCgYsmxqY4tQi0ihGwJN4hFwj1g8r\nkB3mr8QOZnWPknpZQjxFPvXl2aentz1LXpgaFYCWB8W3p2OZbMI2LHPEnhM1\n5ZN9dFWrwZy+2vkTK4v4TvpkOd2i8oD/9Xy2dP1x2siIF0pPIpoqA2KTjzqw\nlgn/5fe2jMzkuee3j8ie+a5wT2LsFyCCWbQKM/cD23WxWZhQm9v0Wtsir+fl\n73xU9Q6p9nCmzl3Dfp0fZHpnIwcmFh/I10RfcZqTafXaPTzuOmOv4c2DPq11\ndNm/YgqVw7WmQlMCpT+E5zBYCYd/I0KKt6BDbItIeZNFTf/QmysfC2AXkql2\ndqO3CYzr+B/CkE5P0n3XaAOVI7DovdgYs02vEFEj9ygpjLvkN/aHhPactbce\n2EpuTaB//O/NCrkvvdaSejjS8O3rcdJiZ5yy04+QHhPHNk7LiUaDZuqggkZx\ntuYWiZulXOk5VC2fvqVFWBbDhnuf+yQb+qoDWrUhWA7BJQT1SBdBAyjYkxRy\nBdQ/\r\n=RpA9\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","module":"index.js","readme":"# @aofl/api-request\n\nA module for making api calls easier. Key features include caching responses and request/response formatters.\n\nCaching is implemented using @aofl/cache-manager and uses MemoryCache. @aofl/api-request caches the promises created by fetch api.\n\nRequest/response formatting referes to constructing a request payload and parsing the response payload. A formatter object should implement `pack()` and `unpack()` properties. `pack()` is to construct the request payload and `unpack()` is used to parse the response. Any number of formatters can be added to `apiRequestInstance` using the `addFromatter()` method. E.g. `GetFormatter`, `PostFormatter`, `CorsFormatter`, `FileUploadFormatter`, `GoogleMapsFormatter`, ....\n\n[Api Documentation](https://ageoflearning.github.io/aofl/v3.x/api-docs/module-@aofl_api-request.html)\n\n## Examples\n* [Basic Example](https://codesandbox.io/s/github/AgeOfLearning/aofl/tree/v3.0.0/aofl-js-packages/api-request/examples/simple)\n\n## Installation\n```bash\nnpm i -S @aofl/api-request\n```\n\n## Usage\n```javascript\nimport {ApiRequest} from '@aofl/api-request';\n\nclass PostFormatter {\n  static pack(payload) {\n    const headers = new Headers();\n    const body = new FormData();\n\n    if (typeof payload !== 'undefined') {\n      body.append('arguments', JSON.stringify(payload));\n    }\n\n    return {\n      method: 'POST',\n      headers,\n      body,\n      mode: 'cors',\n      credentials: 'include'\n    };\n  }\n\n  static unpack(response) {\n    return response.json()\n    .then((data) => {\n      if (data.status !== 'success') {\n        return Promise.reject(data);\n      }\n      return data;\n    });\n  }\n}\n\nconst apiRequestInstance = new ApiRequest();\napiRequestInstance.addFormatter('post', PostFormatter);\n\napiRequestInstance.request('https://example.org/', {}, 'post', true, 'sample-namespace')\n.then((jsonResponse) => {\n})\n.catch((jsonResponse) => {\n});\n```\n","browser":"dist/index.js","scripts":{"docs":"npx jsdoc -c .jsdocrc.json .","test":"echo \"Error: no test specified\" && exit 1","build":"cross-env NODE_ENV=production aofl build","build-ci":"cross-env NODE_ENV=production aofl build --debug","build:dev":"cross-env NODE_ENV=development aofl build","prepublishOnly":"npm run build-ci && npm run docs"},"typings":"types.d.ts","_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"6.12.1","description":"A module for simplifying api calls","directories":{},"_nodeVersion":"12.13.1","_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jsdoc":"^3.6.3","@aofl/cli":"^3.5.0-beta.15","cross-env":"^6.0.3","tsd-jsdoc":"^2.4.0","@aofl/cache-manager":"^3.5.0-beta.15"},"peerDependencies":{"@aofl/cache-manager":">= 3.0.0-beta.1 < 4.0.0"},"_npmOperationalInternal":{"tmp":"tmp/api-request_3.5.0-beta.15_1582458558658_0.1607516025264577","host":"s3://npm-registry-packages"}},"3.5.0-beta.16":{"name":"@aofl/api-request","version":"3.5.0-beta.16","keywords":["aofljs","@aofl/api-request","api request","api","cache response"],"author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/api-request@3.5.0-beta.16","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"contributors":[{"name":"Daniel Belisle","email":"daniel.belisle@aofl.com"},{"name":"Micah Blu","email":"micah.blu@aofl.com"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"5e50c6d92aae8f316411415111738348def1c4e6","tarball":"https://registry.npmjs.org/@aofl/api-request/-/api-request-3.5.0-beta.16.tgz","fileCount":8,"integrity":"sha512-t//4dE7CnwC+O4uCDw5uokuf9IfajcDIsSJGssfb6fhIntshL177v1xevXF6tXsasYZVOwpYJfnWx3WECYmSSA==","signatures":[{"sig":"MEYCIQCsZt85RFOKNNQkiyEnJqScGzenbR1bl4QcObDTcdg8QwIhAMp9UdpMmSDQUc7s0CqhQVmUWGvmyQ9d5mdWj2O9J8kE","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":28211,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeUmjxCRA9TVsSAnZWagAAcJYQAI1ktWX8cq64xemeDxtf\nL3AXHRXRnqw2FeXOus+5BcCPh7fc38AZJ1gktCl5VurejmxKXWF3B7HDpjul\nlvRLhzBu5EqXso1fDTe+hEfVzoH7nHEQJvlVEdEKYjtW7wdKEJRy5KcM6VrX\n/r+O7HMjfwl3PIa0vvxfl3k2uQ3ZU2GkUzj2t+oagqyX3MFHXQZD5UAx6FD9\nWJtzwhoNZX8O/9mBH0OgHfP4ezJV86mQCMx0lePdxBKtsVyG855U7kIH4xLy\nrvk7SEyiuv3qGnP2N4iKmhf2qcn6dSYjN5kX785YQERqTTlSPNv6WdpajN5d\nXPlRZCUMFeaVlxxeSjvhGScB+cxR3LrjVSt1s3VjiZ0YfYdDqd47dkLWsTDm\nwG2KG30B7XypMTOL9WvrZxZ72JljUlaQcmI/5cIzuvQvSoX5uoOsh/a+y73A\n7ucsELmO3Di0MuhHr4jrpOQscNIanZwqox7nBGe9/JVicmZVtZbdbeocShRL\nVWhpqvvErOvaBQeIsorVjwD3uk3bQMM9PdiA/+vnD7D7/ApgrGwTuXa9M7Vr\nyUlAMMQZWXHIsxMJKCxvzltsmvlRBZuZcO0nwODp3eMUtp4n65b4BA0X6sU5\nNpiw1/oKAiD0z1AeX48k3w1TiL6PmM1hhTAy2HImRZ0Loa0gvjXT6EGS1weA\nPtJe\r\n=CTzY\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","module":"index.js","readme":"# @aofl/api-request\n\nA module for making api calls easier. Key features include caching responses and request/response formatters.\n\nCaching is implemented using @aofl/cache-manager and uses MemoryCache. @aofl/api-request caches the promises created by fetch api.\n\nRequest/response formatting referes to constructing a request payload and parsing the response payload. A formatter object should implement `pack()` and `unpack()` properties. `pack()` is to construct the request payload and `unpack()` is used to parse the response. Any number of formatters can be added to `apiRequestInstance` using the `addFromatter()` method. E.g. `GetFormatter`, `PostFormatter`, `CorsFormatter`, `FileUploadFormatter`, `GoogleMapsFormatter`, ....\n\n[Api Documentation](https://ageoflearning.github.io/aofl/v3.x/api-docs/module-@aofl_api-request.html)\n\n## Examples\n* [Basic Example](https://codesandbox.io/s/github/AgeOfLearning/aofl/tree/v3.0.0/aofl-js-packages/api-request/examples/simple)\n\n## Installation\n```bash\nnpm i -S @aofl/api-request\n```\n\n## Usage\n```javascript\nimport {ApiRequest} from '@aofl/api-request';\n\nclass PostFormatter {\n  static pack(payload) {\n    const headers = new Headers();\n    const body = new FormData();\n\n    if (typeof payload !== 'undefined') {\n      body.append('arguments', JSON.stringify(payload));\n    }\n\n    return {\n      method: 'POST',\n      headers,\n      body,\n      mode: 'cors',\n      credentials: 'include'\n    };\n  }\n\n  static unpack(response) {\n    return response.json()\n    .then((data) => {\n      if (data.status !== 'success') {\n        return Promise.reject(data);\n      }\n      return data;\n    });\n  }\n}\n\nconst apiRequestInstance = new ApiRequest();\napiRequestInstance.addFormatter('post', PostFormatter);\n\napiRequestInstance.request('https://example.org/', {}, 'post', true, 'sample-namespace')\n.then((jsonResponse) => {\n})\n.catch((jsonResponse) => {\n});\n```\n","browser":"dist/index.js","scripts":{"docs":"npx jsdoc -c .jsdocrc.json .","test":"echo \"Error: no test specified\" && exit 1","build":"cross-env NODE_ENV=production aofl build","build-ci":"cross-env NODE_ENV=production aofl build --debug","build:dev":"cross-env NODE_ENV=development aofl build","prepublishOnly":"npm run build-ci && npm run docs"},"typings":"types.d.ts","_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"6.12.1","description":"A module for simplifying api calls","directories":{},"_nodeVersion":"12.13.1","_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jsdoc":"^3.6.3","@aofl/cli":"^3.5.0-beta.16","cross-env":"^6.0.3","tsd-jsdoc":"^2.4.0","@aofl/cache-manager":"^3.5.0-beta.16"},"peerDependencies":{"@aofl/cache-manager":">= 3.0.0-beta.1 < 4.0.0"},"_npmOperationalInternal":{"tmp":"tmp/api-request_3.5.0-beta.16_1582459120870_0.7926879488084349","host":"s3://npm-registry-packages"}},"3.5.0-beta.17":{"name":"@aofl/api-request","version":"3.5.0-beta.17","keywords":["aofljs","@aofl/api-request","api request","api","cache response"],"author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/api-request@3.5.0-beta.17","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"contributors":[{"name":"Daniel Belisle","email":"daniel.belisle@aofl.com"},{"name":"Micah Blu","email":"micah.blu@aofl.com"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"5b6e9520d454ce300cc43d00e2e05e28dd5bebda","tarball":"https://registry.npmjs.org/@aofl/api-request/-/api-request-3.5.0-beta.17.tgz","fileCount":8,"integrity":"sha512-QDMQfXr++E/kUSwgiyVklHdrawa/qIWywL7nhKRJPy0HUqP6y+1Oi9z+RXRSDFuCBID5jdi2K/KJCD3F8i7aug==","signatures":[{"sig":"MEUCIFWohHpPbGGQk+npzuRhmgls5fvc5F1AYi9X+TfISeSyAiEAzwGS9YjgvQVHVdwFcsBkHNhV2ylKXQAW2Jv8C4lY+K4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":28211,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeUmymCRA9TVsSAnZWagAAdmoQAI02TlMmsLs+zCQJSH3N\n9GHggSKoL3VsYBDPXbgKoSrPyn8UHlUK5ERumdMvOMtNfv5vJdn4Z6gIst1b\n+dyl6VOktdcILpVryP4OiN2Asw3y8kXSfo9tzbLZ0HVQaPS0D8tvcC8lPQiP\nh1IWnaIikEYB8btip7as7TxeF3vBk6AWzH2FqjjUwdRBYKvLrcNATS+3FSXg\nHZVxmNRdSKkrtVTWGZ/TygODaR9OhEJ7NPdqAWPYwUS2h3jPE8vAuuegH6Fi\n8yEHlOohMS289zFxf+MuCvuN/a4tZy0074/ytWzLFw5eXlQUkupGMwOQVAJm\nso7/bI4SgpCp5sjqiDJeHILgsf+fTsifSvKUxXRYtaPJVs6Az5hdck1mL5qQ\nZf3U4OuDTEOS2i9b4ETgfHTmHqVBD8tLNrWQNVILuzzM0SPN4n/QDsxnCIJD\nDBwm/fdGu7K5LZeXDsocLKVP6l2O8CoFj6S6Z1jk4tDDfp0wQ+Itbg+jp4EF\n5zipsORDa8pdEtH/qkUKs660NxQq7jqMnbOJ3swaktDjaL/Eze40diVho3vQ\nGQ/SkTm39PikL5uqD8tgBcMpFP6YACb2ykZqDYD9i3jFbt/pWzvca6/MAqP+\nuBsS5FxZEuJcV0jueu2tHrgaPC1OVaR+EKt2gs+edQaHTthkz0lSSt4k2Hk4\nKjp1\r\n=toBh\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","module":"index.js","readme":"# @aofl/api-request\n\nA module for making api calls easier. Key features include caching responses and request/response formatters.\n\nCaching is implemented using @aofl/cache-manager and uses MemoryCache. @aofl/api-request caches the promises created by fetch api.\n\nRequest/response formatting referes to constructing a request payload and parsing the response payload. A formatter object should implement `pack()` and `unpack()` properties. `pack()` is to construct the request payload and `unpack()` is used to parse the response. Any number of formatters can be added to `apiRequestInstance` using the `addFromatter()` method. E.g. `GetFormatter`, `PostFormatter`, `CorsFormatter`, `FileUploadFormatter`, `GoogleMapsFormatter`, ....\n\n[Api Documentation](https://ageoflearning.github.io/aofl/v3.x/api-docs/module-@aofl_api-request.html)\n\n## Examples\n* [Basic Example](https://codesandbox.io/s/github/AgeOfLearning/aofl/tree/v3.0.0/aofl-js-packages/api-request/examples/simple)\n\n## Installation\n```bash\nnpm i -S @aofl/api-request\n```\n\n## Usage\n```javascript\nimport {ApiRequest} from '@aofl/api-request';\n\nclass PostFormatter {\n  static pack(payload) {\n    const headers = new Headers();\n    const body = new FormData();\n\n    if (typeof payload !== 'undefined') {\n      body.append('arguments', JSON.stringify(payload));\n    }\n\n    return {\n      method: 'POST',\n      headers,\n      body,\n      mode: 'cors',\n      credentials: 'include'\n    };\n  }\n\n  static unpack(response) {\n    return response.json()\n    .then((data) => {\n      if (data.status !== 'success') {\n        return Promise.reject(data);\n      }\n      return data;\n    });\n  }\n}\n\nconst apiRequestInstance = new ApiRequest();\napiRequestInstance.addFormatter('post', PostFormatter);\n\napiRequestInstance.request('https://example.org/', {}, 'post', true, 'sample-namespace')\n.then((jsonResponse) => {\n})\n.catch((jsonResponse) => {\n});\n```\n","browser":"dist/index.js","scripts":{"docs":"npx jsdoc -c .jsdocrc.json .","test":"echo \"Error: no test specified\" && exit 1","build":"cross-env NODE_ENV=production aofl build","build-ci":"cross-env NODE_ENV=production aofl build --debug","build:dev":"cross-env NODE_ENV=development aofl build","prepublishOnly":"npm run build-ci && npm run docs"},"typings":"types.d.ts","_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"6.12.1","description":"A module for simplifying api calls","directories":{},"_nodeVersion":"12.13.1","_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jsdoc":"^3.6.3","@aofl/cli":"^3.5.0-beta.17","cross-env":"^6.0.3","tsd-jsdoc":"^2.4.0","@aofl/cache-manager":"^3.5.0-beta.17"},"peerDependencies":{"@aofl/cache-manager":">= 3.0.0-beta.1 < 4.0.0"},"_npmOperationalInternal":{"tmp":"tmp/api-request_3.5.0-beta.17_1582460069833_0.1708109609938342","host":"s3://npm-registry-packages"}},"3.5.0-beta.18":{"name":"@aofl/api-request","version":"3.5.0-beta.18","keywords":["aofljs","@aofl/api-request","api request","api","cache response"],"author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/api-request@3.5.0-beta.18","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"contributors":[{"name":"Daniel Belisle","email":"daniel.belisle@aofl.com"},{"name":"Micah Blu","email":"micah.blu@aofl.com"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"0bb5ead8adcc1d32085aab452ce660cf3fcd6bdd","tarball":"https://registry.npmjs.org/@aofl/api-request/-/api-request-3.5.0-beta.18.tgz","fileCount":8,"integrity":"sha512-BVqIMAe6wWYjs+mkSOJRfO6ET3pqik2XAe1ecnWBfF4j3RtcU/b3yhtTTJQf774VmyD6HRD65rdCfEFZAevGCQ==","signatures":[{"sig":"MEUCIBxiDODADX9p3AlTnPQygtiB+jrM8zOrri3DC9oiCjD/AiEAxWiuiTNfl3oxkxCLUBdVsGL8ThNPSpUBnG1unQc5wJY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":28211,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeVJuoCRA9TVsSAnZWagAARYgQAJbSNvRSV5YoskZZR2TG\nFk6ns+VV9+m8LpJ95tZlUptSHnAIDQ2gnupq/Ma10rgd1HBqHHQBOf4w8rCD\n5nFaFblVZm9fd10wVyzCQ5OnfU20lo73xjG9GDfkWZ6cB27o9jThw3Uarhp1\n6mosCkLFvyCMlz7OsndoPGOUa7qENyHFMZDTx9VP7l6fQWQMLq1z/G/sZiKJ\nv685A+9LVic2NeX0Rc0SSYPpAWF0f6jR2bQKeKLOmlzmhj54fhDKbLVLvWQx\nEodFBM647AD3I71/nwThCTa5dp/nJO/VMWbXx0qc8X05YraWfMzpqkWuDJZd\ns/284lLXVvWf8nf35wnBL7bt1OHOSFAHRRgA2JtC+0kCJ2MuyuiI0EhTW4GA\nkPDJyWv/gLsP2EjnrhlaPcMAcqCmqP8YOUqrt8Sd97LympDntuC+FcZpLWJn\nbiQepydhWje7Mu59pdrQx7eU2hbrDCAZXJTdMuAtvMLl9/0FVfkg63REkWS/\nm1mOmZUfOoQ5VDsnNDkDN5IMiY3L0Oxo0UHrrxGWKZjIlS8aGLE9MHM5RLSr\n7YJ/0NoYVkdibpkk9QV8r1e+8P50UTFkedLxClK59mQE0jXCYG/f3BlfDebK\nPnw7QdmJnbCUIGrZOxDzVeD1h2xpAveqkvKzAZWpYWqKoodl+18HrHaX88Yn\nep2e\r\n=01Fd\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","module":"index.js","readme":"# @aofl/api-request\n\nA module for making api calls easier. Key features include caching responses and request/response formatters.\n\nCaching is implemented using @aofl/cache-manager and uses MemoryCache. @aofl/api-request caches the promises created by fetch api.\n\nRequest/response formatting referes to constructing a request payload and parsing the response payload. A formatter object should implement `pack()` and `unpack()` properties. `pack()` is to construct the request payload and `unpack()` is used to parse the response. Any number of formatters can be added to `apiRequestInstance` using the `addFromatter()` method. E.g. `GetFormatter`, `PostFormatter`, `CorsFormatter`, `FileUploadFormatter`, `GoogleMapsFormatter`, ....\n\n[Api Documentation](https://ageoflearning.github.io/aofl/v3.x/api-docs/module-@aofl_api-request.html)\n\n## Examples\n* [Basic Example](https://codesandbox.io/s/github/AgeOfLearning/aofl/tree/v3.0.0/aofl-js-packages/api-request/examples/simple)\n\n## Installation\n```bash\nnpm i -S @aofl/api-request\n```\n\n## Usage\n```javascript\nimport {ApiRequest} from '@aofl/api-request';\n\nclass PostFormatter {\n  static pack(payload) {\n    const headers = new Headers();\n    const body = new FormData();\n\n    if (typeof payload !== 'undefined') {\n      body.append('arguments', JSON.stringify(payload));\n    }\n\n    return {\n      method: 'POST',\n      headers,\n      body,\n      mode: 'cors',\n      credentials: 'include'\n    };\n  }\n\n  static unpack(response) {\n    return response.json()\n    .then((data) => {\n      if (data.status !== 'success') {\n        return Promise.reject(data);\n      }\n      return data;\n    });\n  }\n}\n\nconst apiRequestInstance = new ApiRequest();\napiRequestInstance.addFormatter('post', PostFormatter);\n\napiRequestInstance.request('https://example.org/', {}, 'post', true, 'sample-namespace')\n.then((jsonResponse) => {\n})\n.catch((jsonResponse) => {\n});\n```\n","browser":"dist/index.js","scripts":{"docs":"npx jsdoc -c .jsdocrc.json .","test":"echo \"Error: no test specified\" && exit 1","build":"cross-env NODE_ENV=production aofl build","build-ci":"cross-env NODE_ENV=production aofl build --debug","build:dev":"cross-env NODE_ENV=development aofl build","prepublishOnly":"npm run build-ci && npm run docs"},"typings":"types.d.ts","_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"6.12.1","description":"A module for simplifying api calls","directories":{},"_nodeVersion":"12.13.1","_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jsdoc":"^3.6.3","@aofl/cli":"^3.5.0-beta.18","cross-env":"^6.0.3","tsd-jsdoc":"^2.4.0","@aofl/cache-manager":"^3.5.0-beta.18"},"peerDependencies":{"@aofl/cache-manager":">= 3.0.0-beta.1 < 4.0.0"},"_npmOperationalInternal":{"tmp":"tmp/api-request_3.5.0-beta.18_1582603176312_0.3635851879157552","host":"s3://npm-registry-packages"}},"3.5.0-beta.19":{"name":"@aofl/api-request","version":"3.5.0-beta.19","keywords":["aofljs","@aofl/api-request","api request","api","cache response"],"author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/api-request@3.5.0-beta.19","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"contributors":[{"name":"Daniel Belisle","email":"daniel.belisle@aofl.com"},{"name":"Micah Blu","email":"micah.blu@aofl.com"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"7a931c4935d49bb6e227529a38971f8569eae106","tarball":"https://registry.npmjs.org/@aofl/api-request/-/api-request-3.5.0-beta.19.tgz","fileCount":8,"integrity":"sha512-O7hrVvfolmkirIReNkI06iZlOl9U6y19YHzcaOqN9NqqspZfZ2t/5KSIEpXyBGRB/0ntU8FrHLs3cfSe+5J6Aw==","signatures":[{"sig":"MEQCIB7gxzVr2mTCTadSaOX/k7rNXE3j/qOmC4FYwuGQ9vw4AiBnU36VgRU5HipdkASXj7VHqqQDR5d9+qjVPz+kqx3h6g==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":28211,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeVbRXCRA9TVsSAnZWagAAPzgP/j630dGyqLXolh7jq0Lm\n4NZj5q/+uQQbJB2+s/E0s1aUFFdJsrIPUQ1qsfvFtAL48r5A0SD+ehAZf1Ju\nj7nUrGchMM4Hmnu4pnQoKv5+kjg05tImEPdHUoS35HeeNPN4IYKOgjq0GUKx\nqCnjh/xd0Zdkz2DaHdb38Fats74h76dp6fUZ6v2hm+JUsKTAx+HGn9hUSuSv\nIGRtClS/W+BNxK7Xs2u6rdCRVPtMKEKVxURsGdDPqfzEyqfhMuQMUs4X940v\nysIMcVmbDh0o+gL087YxzgRq3vH27STbJnNCU80cnBa5bcT9pXqrqrezc+19\nU7JDvK8GJ1X+SdUO39YOVnZQRs6dbw4AtOeui/sLgTwtF0xMF26uT6nCOJV3\nzXgWVK6y/AsOZ0WyO2q/OZEPq3BEXVqbYAz1BSy+ItPogBd5UbApV3inNsZp\nw6BMq5QpUAStasiqYuiYjrtN9SRwv+VGsD7MV7i1loPLXWg12lvLYE8NV/p+\nerjTRXcMDCGmr7OnGLefrbEaS0q+VYFzkFupEaKFg8T3Qy/529P1yiWDiQ1l\nvCQQLM/3+Iz0bDVPm2+8mRuLeDpJu7eGCZOz/aidYAmlMnF/xqObKWbFYe6I\n63C9brzSEd/JOSJagvnpwyQS7TTFw3s0eWlpOZFVGsWAes/w116AEBO6pXGB\nKU5b\r\n=y/0T\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","module":"index.js","readme":"# @aofl/api-request\n\nA module for making api calls easier. Key features include caching responses and request/response formatters.\n\nCaching is implemented using @aofl/cache-manager and uses MemoryCache. @aofl/api-request caches the promises created by fetch api.\n\nRequest/response formatting referes to constructing a request payload and parsing the response payload. A formatter object should implement `pack()` and `unpack()` properties. `pack()` is to construct the request payload and `unpack()` is used to parse the response. Any number of formatters can be added to `apiRequestInstance` using the `addFromatter()` method. E.g. `GetFormatter`, `PostFormatter`, `CorsFormatter`, `FileUploadFormatter`, `GoogleMapsFormatter`, ....\n\n[Api Documentation](https://ageoflearning.github.io/aofl/v3.x/api-docs/module-@aofl_api-request.html)\n\n## Examples\n* [Basic Example](https://codesandbox.io/s/github/AgeOfLearning/aofl/tree/v3.0.0/aofl-js-packages/api-request/examples/simple)\n\n## Installation\n```bash\nnpm i -S @aofl/api-request\n```\n\n## Usage\n```javascript\nimport {ApiRequest} from '@aofl/api-request';\n\nclass PostFormatter {\n  static pack(payload) {\n    const headers = new Headers();\n    const body = new FormData();\n\n    if (typeof payload !== 'undefined') {\n      body.append('arguments', JSON.stringify(payload));\n    }\n\n    return {\n      method: 'POST',\n      headers,\n      body,\n      mode: 'cors',\n      credentials: 'include'\n    };\n  }\n\n  static unpack(response) {\n    return response.json()\n    .then((data) => {\n      if (data.status !== 'success') {\n        return Promise.reject(data);\n      }\n      return data;\n    });\n  }\n}\n\nconst apiRequestInstance = new ApiRequest();\napiRequestInstance.addFormatter('post', PostFormatter);\n\napiRequestInstance.request('https://example.org/', {}, 'post', true, 'sample-namespace')\n.then((jsonResponse) => {\n})\n.catch((jsonResponse) => {\n});\n```\n","browser":"dist/index.js","scripts":{"docs":"npx jsdoc -c .jsdocrc.json .","test":"echo \"Error: no test specified\" && exit 1","build":"cross-env NODE_ENV=production aofl build","build-ci":"cross-env NODE_ENV=production aofl build --debug","build:dev":"cross-env NODE_ENV=development aofl build","prepublishOnly":"npm run build-ci && npm run docs"},"typings":"types.d.ts","_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"6.12.1","description":"A module for simplifying api calls","directories":{},"_nodeVersion":"12.13.1","_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jsdoc":"^3.6.3","@aofl/cli":"^3.5.0-beta.19","cross-env":"^6.0.3","tsd-jsdoc":"^2.4.0","@aofl/cache-manager":"^3.5.0-beta.19"},"peerDependencies":{"@aofl/cache-manager":">= 3.0.0-beta.1 < 4.0.0"},"_npmOperationalInternal":{"tmp":"tmp/api-request_3.5.0-beta.19_1582675030864_0.6632004924884756","host":"s3://npm-registry-packages"}},"3.5.0-beta.20":{"name":"@aofl/api-request","version":"3.5.0-beta.20","keywords":["aofljs","@aofl/api-request","api request","api","cache response"],"author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/api-request@3.5.0-beta.20","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"contributors":[{"name":"Daniel Belisle","email":"daniel.belisle@aofl.com"},{"name":"Micah Blu","email":"micah.blu@aofl.com"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"cd73edfd20489b9a995d73cbc00d813e925ffc12","tarball":"https://registry.npmjs.org/@aofl/api-request/-/api-request-3.5.0-beta.20.tgz","fileCount":8,"integrity":"sha512-E8ZkYvzpeM12VdkDJcE/u91wS9vPGxCsmVOxN+BYyime8QqaouyZK7IEBmXS9IT94mb9lcF+yJqDeCalvwc3og==","signatures":[{"sig":"MEUCIEZpHr/KByRpCnZWRsiW7LMdJYoztlaKTysgw7aqkPu6AiEA11QLQu2TrYeZtxDnEzpdjHcUi2qP2BKkqx1k+xsIhjg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":28211,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeXZVECRA9TVsSAnZWagAAizEP/RmkwPqcE52Ajjd+1Xnt\nVB4ve3UkgsObxaknS3rKFGBQicr5BdehmaKk+lWHeyMQRPRksiEJKrn51H3Z\nHj7dIMNUX07+8IBeDOwYPiyYT7ndzJZ7agymusFxVfiRvMgI9TqZH8q45pL6\n0dwROM0LjI47dEb2FcQVm1pn1UHBiU9qxHkWefQ5Sz8a9r2VMai0GmVFLmJk\nBd3W495CR/A0DuTXHjYCej4tKM+8ach9ZBjWwdkhy6T6E2xZ7cD/VJwij9hO\nk7ekGQeMroXUrHIX3r+y6bmckJ7xvchcbrlgVoeVRyyDr89kTarIoh5ckW+L\nPH69ER/29mrCe7h6Sg212KzelxWu8ql+CY6f1vwJu3o6CzyxpypCku+oH5sD\nFPsu0rpTPbvNFvlGSxC9HtLqwIXLlrOSyHzAnhCTT+ts1w8M8WB57q23AeGM\n0l9eWjViow5w+X6Gk4gTw79jCzLCEJXlc77J/kG+qQLl50bphERTMqsY8wFY\nqWdDtZddVfqH4/v687PFpwRy0QST75aIkzKQx/TPn2da47FmcWf3hPTMNaym\nGOYnbbMMGkps3fGJDXF20XDmC1/+hJ+qWqvtAZhVbAbwNOJHAh9UiUpVXxL5\nz99+dJRPsO6lBYrI/+sgvKrD4980Zj+voXcDhH0Fw9KHoby5S7ip7eT8r0SS\nHe2V\r\n=dAST\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","module":"index.js","readme":"# @aofl/api-request\n\nA module for making api calls easier. Key features include caching responses and request/response formatters.\n\nCaching is implemented using @aofl/cache-manager and uses MemoryCache. @aofl/api-request caches the promises created by fetch api.\n\nRequest/response formatting referes to constructing a request payload and parsing the response payload. A formatter object should implement `pack()` and `unpack()` properties. `pack()` is to construct the request payload and `unpack()` is used to parse the response. Any number of formatters can be added to `apiRequestInstance` using the `addFromatter()` method. E.g. `GetFormatter`, `PostFormatter`, `CorsFormatter`, `FileUploadFormatter`, `GoogleMapsFormatter`, ....\n\n[Api Documentation](https://ageoflearning.github.io/aofl/v3.x/api-docs/module-@aofl_api-request.html)\n\n## Examples\n* [Basic Example](https://codesandbox.io/s/github/AgeOfLearning/aofl/tree/v3.0.0/aofl-js-packages/api-request/examples/simple)\n\n## Installation\n```bash\nnpm i -S @aofl/api-request\n```\n\n## Usage\n```javascript\nimport {ApiRequest} from '@aofl/api-request';\n\nclass PostFormatter {\n  static pack(payload) {\n    const headers = new Headers();\n    const body = new FormData();\n\n    if (typeof payload !== 'undefined') {\n      body.append('arguments', JSON.stringify(payload));\n    }\n\n    return {\n      method: 'POST',\n      headers,\n      body,\n      mode: 'cors',\n      credentials: 'include'\n    };\n  }\n\n  static unpack(response) {\n    return response.json()\n    .then((data) => {\n      if (data.status !== 'success') {\n        return Promise.reject(data);\n      }\n      return data;\n    });\n  }\n}\n\nconst apiRequestInstance = new ApiRequest();\napiRequestInstance.addFormatter('post', PostFormatter);\n\napiRequestInstance.request('https://example.org/', {}, 'post', true, 'sample-namespace')\n.then((jsonResponse) => {\n})\n.catch((jsonResponse) => {\n});\n```\n","browser":"dist/index.js","scripts":{"docs":"npx jsdoc -c .jsdocrc.json .","test":"echo \"Error: no test specified\" && exit 1","build":"cross-env NODE_ENV=production aofl build","build-ci":"cross-env NODE_ENV=production aofl build --debug","build:dev":"cross-env NODE_ENV=development aofl build","prepublishOnly":"npm run build-ci && npm run docs"},"typings":"types.d.ts","_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"6.12.1","description":"A module for simplifying api calls","directories":{},"_nodeVersion":"12.13.1","_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jsdoc":"^3.6.3","@aofl/cli":"^3.5.0-beta.20","cross-env":"^6.0.3","tsd-jsdoc":"^2.4.0","@aofl/cache-manager":"^3.5.0-beta.20"},"peerDependencies":{"@aofl/cache-manager":">= 3.0.0-beta.1 < 4.0.0"},"_npmOperationalInternal":{"tmp":"tmp/api-request_3.5.0-beta.20_1583191364318_0.693756664307948","host":"s3://npm-registry-packages"}},"3.5.0-beta.21":{"name":"@aofl/api-request","version":"3.5.0-beta.21","keywords":["aofljs","@aofl/api-request","api request","api","cache response"],"author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/api-request@3.5.0-beta.21","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"contributors":[{"name":"Daniel Belisle","email":"daniel.belisle@aofl.com"},{"name":"Micah Blu","email":"micah.blu@aofl.com"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"65316fbcdbc190c3f8e9fcfeb56cd309d9109a7d","tarball":"https://registry.npmjs.org/@aofl/api-request/-/api-request-3.5.0-beta.21.tgz","fileCount":8,"integrity":"sha512-9VYQ7AAlqaZZ9KriciZucs5lYBFxt8gPkgZ16/nnaNoExg5lzpfP3Uc2DJ8iC5tQoIVfyH36Bs1tXt1w3Z+h1g==","signatures":[{"sig":"MEQCIAvSS95UCL0+i0c7DSafPaFPpCeiRUlhFdwOw5rs2UOKAiBWfuTZfEv3PY98EVfEPdnTVwM0dU/xlVvpuXLnrSRSfA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":28211,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeXZZKCRA9TVsSAnZWagAAjIcP/0D9z2mq5pCZUOdTK75K\nSGQcVPpDF5dPja3pkhnCEqt+7rg79Y7PFGTSlqyCASJ23WwnhEUgYvgkqzwn\niADl3aW/OR7gD01zsAMutxt9pU6xkO1LC0P0xH5UXPgjgJ5Y03u5IY14QMa+\nSMNosB2OTbUJkPgXUmg/xqHMTF55j66lLChdDuSL+O09ulMCqsUXMa16vUOc\nWME25oH6YCYw+pKrC/yI2WghFNQiypQyflh9DD+j6lMdjh2LxPdmhliATdq9\nt7Jn8sy5SiwAfHt0XBxNx2Xv97Q1Qz4Vwryja5FSYXYusd5fwX21bRhaZJgm\nG6NcPAgqJk+h2Wwv5/saJRYi2K1VEKQvuzSE90z762hIbxDlLSpCw0eif2go\nqzqBWbnxIKj8y3D1t2mWH/DnzwRGII+R6rXBIr1xW02EnA6CjlkGdwhoOl9S\nifrobvkW9E8lCfxItCfwwQBNfy0i2wmWTyBES4HIPBWFHJyKrbi71J5bH4Hd\nzAdKdfK98Kvo0OYzZ7yk/oZA8P4MWEZeON/RAaa+KQpMCKx0b3bOm4NISZNU\nhkZVdaNF/00+SHenZzq9QeggPuelHVKLDmmS7qvnsywfeyYaoR/VE4ssIRd3\nGJA7nuOWrCLoByY0aELUr/LTX4oCDmyNMeT0rEvLE1ZNMq1skpS5k4p6y6GF\n5s3b\r\n=PbiP\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","module":"index.js","readme":"# @aofl/api-request\n\nA module for making api calls easier. Key features include caching responses and request/response formatters.\n\nCaching is implemented using @aofl/cache-manager and uses MemoryCache. @aofl/api-request caches the promises created by fetch api.\n\nRequest/response formatting referes to constructing a request payload and parsing the response payload. A formatter object should implement `pack()` and `unpack()` properties. `pack()` is to construct the request payload and `unpack()` is used to parse the response. Any number of formatters can be added to `apiRequestInstance` using the `addFromatter()` method. E.g. `GetFormatter`, `PostFormatter`, `CorsFormatter`, `FileUploadFormatter`, `GoogleMapsFormatter`, ....\n\n[Api Documentation](https://ageoflearning.github.io/aofl/v3.x/api-docs/module-@aofl_api-request.html)\n\n## Examples\n* [Basic Example](https://codesandbox.io/s/github/AgeOfLearning/aofl/tree/v3.0.0/aofl-js-packages/api-request/examples/simple)\n\n## Installation\n```bash\nnpm i -S @aofl/api-request\n```\n\n## Usage\n```javascript\nimport {ApiRequest} from '@aofl/api-request';\n\nclass PostFormatter {\n  static pack(payload) {\n    const headers = new Headers();\n    const body = new FormData();\n\n    if (typeof payload !== 'undefined') {\n      body.append('arguments', JSON.stringify(payload));\n    }\n\n    return {\n      method: 'POST',\n      headers,\n      body,\n      mode: 'cors',\n      credentials: 'include'\n    };\n  }\n\n  static unpack(response) {\n    return response.json()\n    .then((data) => {\n      if (data.status !== 'success') {\n        return Promise.reject(data);\n      }\n      return data;\n    });\n  }\n}\n\nconst apiRequestInstance = new ApiRequest();\napiRequestInstance.addFormatter('post', PostFormatter);\n\napiRequestInstance.request('https://example.org/', {}, 'post', true, 'sample-namespace')\n.then((jsonResponse) => {\n})\n.catch((jsonResponse) => {\n});\n```\n","browser":"dist/index.js","scripts":{"docs":"npx jsdoc -c .jsdocrc.json .","test":"echo \"Error: no test specified\" && exit 1","build":"cross-env NODE_ENV=production aofl build","build-ci":"cross-env NODE_ENV=production aofl build --debug","build:dev":"cross-env NODE_ENV=development aofl build","prepublishOnly":"npm run build-ci && npm run docs"},"typings":"types.d.ts","_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"6.12.1","description":"A module for simplifying api calls","directories":{},"_nodeVersion":"12.13.1","_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jsdoc":"^3.6.3","@aofl/cli":"^3.5.0-beta.21","cross-env":"^6.0.3","tsd-jsdoc":"^2.4.0","@aofl/cache-manager":"^3.5.0-beta.21"},"peerDependencies":{"@aofl/cache-manager":">= 3.0.0-beta.1 < 4.0.0"},"_npmOperationalInternal":{"tmp":"tmp/api-request_3.5.0-beta.21_1583191625840_0.6287680177170947","host":"s3://npm-registry-packages"}},"3.5.0-beta.22":{"name":"@aofl/api-request","version":"3.5.0-beta.22","keywords":["aofljs","@aofl/api-request","api request","api","cache response"],"author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/api-request@3.5.0-beta.22","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"contributors":[{"name":"Daniel Belisle","email":"daniel.belisle@aofl.com"},{"name":"Micah Blu","email":"micah.blu@aofl.com"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"9f764ad9c8e87ba10b9b4061dbfaf9ea3664a3f9","tarball":"https://registry.npmjs.org/@aofl/api-request/-/api-request-3.5.0-beta.22.tgz","fileCount":8,"integrity":"sha512-xSbEni46lDPa7IYzvJorIZwOZ9Xr/x0wn2PBT7WBWRQPIOKwsS3ho+EVAZk6tFDtjPcuGOrm2Lewbqbf0COnCQ==","signatures":[{"sig":"MEQCIDdw5CFdswyHUOxZViLz4LbybbO29CAQZlGnNWQPf/LnAiBscdbXQ3phmwmZRdjrz/t2XTUEahW6593O2t+BAgA98g==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":28211,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeXZnaCRA9TVsSAnZWagAAMTUQAJp5+J7h4kFhOZ+gZ7+A\nGSXTow32uWuGNtA4ZOPCRiqebDSYiaKodlWR3Efb+fNW7JulAfp3GpzNZkYH\nR9/XMDL57ClRhYTQeL6PV0GQfL3gwy1baOO4GGaicM3eCnwAuHkmfH0um7RB\nx8WT90Mzjt1fEMYkKJPSuGoWL1bXQo1fE9ILBEJt6KUjmq+W1CFpEGQ4LaPN\noXKDU5RBSslx4jSCRiF/dh97iSw87HgxP4QO9EEXfv4bFD5E/ayIlIeDmbt7\nCmGp+JcHfzRonJpWrQi8NIB7vltDqzuLvkp5zpwhAH1hIcRDdal/ida0kqmb\n+e0keGB51zweph5XWBO7rUBjQ2bPYdqQkNG/3eiNsgbNn2pdrlsGp5FnOMwT\n12AmenzV8CX+D2z4M5RDoPu9wuypQ0ZCpTuDY3pcA2KK+TXTJAJW8hOikzDZ\nSs6ccbYRq2kIn7sccAzSNmW6lADnLE0yOCp89qpAQGcQDcufO37tcpXpLsqY\npH3UbAvnma/GFPsKUVyPJDXY+pOWe5udfaNPGbqUbvjpgfN/0oGMarYV/la6\nkDWRMs6nD93DqAgB5RmRMyiVmjoRJTty9spfE6Y7T9Erelp1e3SBoY2MX4I9\n17K+kHM8ey2hKNM7XVegyqjY2T5kusksys+ovZ9qX750Yg3cEq4L/GB74rcC\ng0DF\r\n=agyO\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","module":"index.js","readme":"# @aofl/api-request\n\nA module for making api calls easier. Key features include caching responses and request/response formatters.\n\nCaching is implemented using @aofl/cache-manager and uses MemoryCache. @aofl/api-request caches the promises created by fetch api.\n\nRequest/response formatting referes to constructing a request payload and parsing the response payload. A formatter object should implement `pack()` and `unpack()` properties. `pack()` is to construct the request payload and `unpack()` is used to parse the response. Any number of formatters can be added to `apiRequestInstance` using the `addFromatter()` method. E.g. `GetFormatter`, `PostFormatter`, `CorsFormatter`, `FileUploadFormatter`, `GoogleMapsFormatter`, ....\n\n[Api Documentation](https://ageoflearning.github.io/aofl/v3.x/api-docs/module-@aofl_api-request.html)\n\n## Examples\n* [Basic Example](https://codesandbox.io/s/github/AgeOfLearning/aofl/tree/v3.0.0/aofl-js-packages/api-request/examples/simple)\n\n## Installation\n```bash\nnpm i -S @aofl/api-request\n```\n\n## Usage\n```javascript\nimport {ApiRequest} from '@aofl/api-request';\n\nclass PostFormatter {\n  static pack(payload) {\n    const headers = new Headers();\n    const body = new FormData();\n\n    if (typeof payload !== 'undefined') {\n      body.append('arguments', JSON.stringify(payload));\n    }\n\n    return {\n      method: 'POST',\n      headers,\n      body,\n      mode: 'cors',\n      credentials: 'include'\n    };\n  }\n\n  static unpack(response) {\n    return response.json()\n    .then((data) => {\n      if (data.status !== 'success') {\n        return Promise.reject(data);\n      }\n      return data;\n    });\n  }\n}\n\nconst apiRequestInstance = new ApiRequest();\napiRequestInstance.addFormatter('post', PostFormatter);\n\napiRequestInstance.request('https://example.org/', {}, 'post', true, 'sample-namespace')\n.then((jsonResponse) => {\n})\n.catch((jsonResponse) => {\n});\n```\n","browser":"dist/index.js","scripts":{"docs":"npx jsdoc -c .jsdocrc.json .","test":"echo \"Error: no test specified\" && exit 1","build":"cross-env NODE_ENV=production aofl build","build-ci":"cross-env NODE_ENV=production aofl build --debug","build:dev":"cross-env NODE_ENV=development aofl build","prepublishOnly":"npm run build-ci && npm run docs"},"typings":"types.d.ts","_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"6.12.1","description":"A module for simplifying api calls","directories":{},"_nodeVersion":"12.13.1","_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jsdoc":"^3.6.3","@aofl/cli":"^3.5.0-beta.22","cross-env":"^6.0.3","tsd-jsdoc":"^2.4.0","@aofl/cache-manager":"^3.5.0-beta.22"},"peerDependencies":{"@aofl/cache-manager":">= 3.0.0-beta.1 < 4.0.0"},"_npmOperationalInternal":{"tmp":"tmp/api-request_3.5.0-beta.22_1583192538087_0.46226350070735567","host":"s3://npm-registry-packages"}},"3.5.0":{"name":"@aofl/api-request","version":"3.5.0","keywords":["aofljs","@aofl/api-request","api request","api","cache response"],"author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/api-request@3.5.0","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"contributors":[{"name":"Daniel Belisle","email":"daniel.belisle@aofl.com"},{"name":"Micah Blu","email":"micah.blu@aofl.com"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"20c08cc004c16db46479ecd9fff2e879d24957de","tarball":"https://registry.npmjs.org/@aofl/api-request/-/api-request-3.5.0.tgz","fileCount":8,"integrity":"sha512-sr6a1f5A0iJtCip/DX6r/xvHb8Mk/t5z3IqO/qRMNoHRFv7NSzKlfeTwJREZY9rGNEP28tkkGkExZVVw3xRnuA==","signatures":[{"sig":"MEYCIQCeA3RkQf3vLbZGqriJojZolMDuzH0PIzwiAj3Gma1QagIhALsB9dmFqUlE9zN108XayrGqWPmoItrOljHOrqJl8a5i","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":28187,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeXZ62CRA9TVsSAnZWagAAW1sQAJI19qOdvdhJFksj574I\nyg4ytfpcSWMzXAWmfDMsWe/X4hYsk42k2HlUdHo57m0roKAy12SiUCq3HI6/\nVWkygNCLz9L41pYZti3rWQhbMyWCEikeB++SCk+y1EHAqOVw+70ruK7dZwyR\nsLfz934roGOkYpv2sc1EtFsY1eML6r2rdWdMg4/2bfBnFT12oAZyv7VAYU/m\nJLkyBsvtB4sw5UBTpSMsgxfe+c5rpfgpD/vdDOs3EhdJmDRtwx25NW0WAjWM\nV/utuL31VyJrut3190Re0Jgo7rpsaI/EdeQQ3XfRUaAX3uOnQKvXmGx0E7mm\nuij/56kTz4+5jaK90bvRH/YiPVpHcdKrMGVr28gxjbqH2fgu7pDf4R7eD+lw\nnzGO0zCj9FSPcG7YpayAVk5CIA4339yLz+wgvHTwP5KHJk5wQBxf+t5Sj1UL\nMBVW5LwcMg1HgjWmNHE/+hW0yY5os2xGwdbkO7U09ic6VDbRshrjsex8R15x\n+Q1Bmx4EPAmBjP2K9XuNLAQeurvYsGKOnKQA7mrALlSkFCYgRH/8KsjK1qgR\nOfWTUh09QfXzVZZtkt7og8ccwDi8aNix6vBF5TUQvvYFj/I3Rz0hmuArXuvN\nvNeM9XAlnaAPoTh/LueVUlCp/gG+PN2r29UPdL8LWDlblxVGsaAXz/Ge9sA8\nOneW\r\n=o4Ti\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","module":"index.js","browser":"dist/index.js","scripts":{"docs":"npx jsdoc -c .jsdocrc.json .","test":"echo \"Error: no test specified\" && exit 1","build":"cross-env NODE_ENV=production aofl build","build-ci":"cross-env NODE_ENV=production aofl build --debug","build:dev":"cross-env NODE_ENV=development aofl build","prepublishOnly":"npm run build-ci && npm run docs"},"typings":"types.d.ts","_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"6.12.1","description":"A module for simplifying api calls","directories":{},"_nodeVersion":"12.13.1","_hasShrinkwrap":false,"devDependencies":{"jsdoc":"^3.6.3","@aofl/cli":"^3.5.0","cross-env":"^6.0.3","tsd-jsdoc":"^2.4.0","@aofl/cache-manager":"^3.5.0"},"peerDependencies":{"@aofl/cache-manager":">= 3.0.0-beta.1 < 4.0.0"},"_npmOperationalInternal":{"tmp":"tmp/api-request_3.5.0_1583193782328_0.35348696684468606","host":"s3://npm-registry-packages"}},"3.6.1":{"name":"@aofl/api-request","version":"3.6.1","keywords":["aofljs","@aofl/api-request","api request","api","cache response"],"author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/api-request@3.6.1","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"contributors":[{"name":"Daniel Belisle","email":"daniel.belisle@aofl.com"},{"name":"Micah Blu","email":"micah.blu@aofl.com"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"db078721abc8954de1d18836f137b43d3115fcaa","tarball":"https://registry.npmjs.org/@aofl/api-request/-/api-request-3.6.1.tgz","fileCount":8,"integrity":"sha512-mlqVt2TGK7qvSYo37W3SO8mp94sQ/BQvAUMr4TyCuDCqLZi04DWyKoxeBk/38iWMws7ZbGWRv/2yANHLmmt4fg==","signatures":[{"sig":"MEUCIBJQBakBQBlzGc6brQchaHXC/2QxmlmiZelKlXmAzrifAiEAwL32k/4+/cmKCn1DaJhwRCIBBJpyLDzJIwXLNxk0f+4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27932,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeZ9+xCRA9TVsSAnZWagAAsz4P/jKSpTafwpeqjyNrH5IT\nSKQHBRn+2X61JrbB6dNxiUULhk46p7n0kX5nzXcFDZRi/QmUJTsonN6cS4jd\nCQlIu1Ntsz/yyyQRMqFJbg4GFjWJzY/sswy2UJ2XrDOZvL6m6RrdRhrp1nn9\nJYNVOH0B90s2rYrsB2pyjObrBTEx+W3vLDtBz1r7Cf6S4IBz1PZpWWGe8qp6\n6SY51yThOJkHnX6FBhSoNd3Kr6a3t0XXSiZ+d6kvOwJxjx6dhQqXzgV9gQb9\n8YD6RTAsKpqAjAVWC2PMM1HJDdHwd8OdBblZAO/BYMDVPg8jjFIglFFz0GHH\no4NSqAtUSTmszUe37r3GH4SlcXXMnxQt4QTDNSzdBuEIPdeAsYoVOVAEBbs8\nboSdAPDy4tpBwg4JY0VgdWUhqgwq8bZZxVb3t1jBsGUMLEY2eyvAbrwtWpEM\nrNwi8DLIgFPB/nQjDbquCC8VodUFDUy83A5XSeHKV/ME0f0VBCY5Vzt7fFII\noo23EnIluy8q++Vquy2O3h8UNwQJr8/MuluH8SUOR4rOzNXYLby7okX1OZgh\nJcP7mV5hrgabgwnp5ZRb0bWpqATZYgpWgTUCFs/MZ3f3H1K08OWqsfT2PKCC\nKP+rgEVCY88SjaO3GnkP9E7Q8l4kH74kW/7G6vE915pSUFJG3FAeGbGr+aaX\noxEZ\r\n=YJh5\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","module":"index.js","browser":"dist/index.js","scripts":{"docs":"npx jsdoc -c .jsdocrc.json .","test":"echo \"Error: no test specified\" && exit 1","build":"cross-env NODE_ENV=production aofl build","build-ci":"cross-env NODE_ENV=production aofl build --debug","build:dev":"cross-env NODE_ENV=development aofl build","prepublishOnly":"npm run build-ci && npm run docs"},"typings":"types.d.ts","_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"6.12.1","description":"A module for simplifying api calls","directories":{},"_nodeVersion":"12.13.1","_hasShrinkwrap":false,"devDependencies":{"jsdoc":"^3.6.3","@aofl/cli":"^3.6.1","cross-env":"^6.0.3","tsd-jsdoc":"^2.4.0","@aofl/cache-manager":"^3.6.1"},"peerDependencies":{"@aofl/cache-manager":">= 3.0.0-beta.1 < 4.0.0"},"_npmOperationalInternal":{"tmp":"tmp/api-request_3.6.1_1583865776650_0.8605187293251082","host":"s3://npm-registry-packages"}},"3.8.0":{"name":"@aofl/api-request","version":"3.8.0","keywords":["aofljs","@aofl/api-request","api request","api","cache response"],"author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/api-request@3.8.0","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"contributors":[{"name":"Daniel Belisle","email":"daniel.belisle@aofl.com"},{"name":"Micah Blu","email":"micah.blu@aofl.com"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"c685797d3daec22847bae6d3b06c70a7dc84ffa7","tarball":"https://registry.npmjs.org/@aofl/api-request/-/api-request-3.8.0.tgz","fileCount":8,"integrity":"sha512-hJuSCJ2ZtFT68C3sod7Fm0WaOPT41oy6qZpMRSYR0RiB754QunTf2gl/I1LyRUDe3cgSv9y86MHS9lRypRcvhA==","signatures":[{"sig":"MEUCIBGaxnKVSPy21aE/YMWXkQ2vDYhssw8vUv+ibkLyHOEQAiEAxqF7DoTR5qVdpg32Dn1ZJqxTeOQrfU6l91meu+b46BQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27932,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeuvbFCRA9TVsSAnZWagAAXCgQAIN/J/j6PeDm65voNAbM\n5sJAzeVcYCt/sQlt3ZjXtS/UtZ2Mi/+atF3eC4KrbSipRZa0fiaZbfdPEUVz\njK3OO94SHIRaUP80UWtTb+RzZk82vc7BDGzgJArquSzKTWvZweGNy2kQGojx\n7FcKnPuMpYMIdgJJCj7gEp3yDB+/ZGi9cEsf88X2WAR9GpCapsApG1hpTLc1\n5KCCka8sPuS8F3MvyelpLfmqcE+63pwlt8x/G5fTYoyoPddn/3IVG1l4cP20\nRu7TUXGKOXu36RDTalifo5ngJ0HOlLpzwxKhfK0AuMiNMWSTlnaSJD6Y7QwZ\nf5ouzE9YaEWYlYrEJwxck1AmMBe11hgtCAdChT3ah2SYUjcFYHvGMR9ZaW/7\n8ZI2GnAX7YZEkOdipgxkEt5SSmOtuQYYUUeZsz7X/BkuvXAtY+vYKKcchfVa\n49l6FzFrzSGP+GeoYdgfNqcdba67+AqLf69GGGQgvwcFTZ3yHOAr3vAuCOje\nqwTbOFkms7BsIkoi+dI74I3gGJWopG7CSM69VnGdwPUFXsFg8LPCaSAOcv1u\n4vljhCVmfijN3q+qt3ivSIqyeVzEEORVrn3ZUw1kr9CPwl8UVRXKYuPZCTgF\nN4msqSrVgfWC1GYooS4Ifi5iXzSlqAs8+bVcUCmhSzAjTo7vhWMBCD7pPSeI\nLo6M\r\n=T2+9\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","module":"index.js","browser":"dist/index.js","scripts":{"docs":"npx jsdoc -c .jsdocrc.json .","test":"echo \"Error: no test specified\" && exit 1","build":"cross-env NODE_ENV=production aofl build","build-ci":"cross-env NODE_ENV=production aofl build --debug","build:dev":"cross-env NODE_ENV=development aofl build","prepublishOnly":"npm run build-ci && npm run docs"},"typings":"types.d.ts","_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"6.14.5","description":"A module for simplifying api calls","directories":{},"_nodeVersion":"12.8.0","_hasShrinkwrap":false,"devDependencies":{"jsdoc":"^3.6.3","@aofl/cli":"^3.8.0","cross-env":"^6.0.3","tsd-jsdoc":"^2.4.0","@aofl/cache-manager":"^3.8.0"},"peerDependencies":{"@aofl/cache-manager":">= 3.0.0-beta.1 < 4.0.0"},"_npmOperationalInternal":{"tmp":"tmp/api-request_3.8.0_1589311172648_0.321817121111162","host":"s3://npm-registry-packages"}},"3.9.0-alpha.0":{"name":"@aofl/api-request","version":"3.9.0-alpha.0","keywords":["aofljs","@aofl/api-request","api request","api","cache response"],"author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/api-request@3.9.0-alpha.0","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"contributors":[{"name":"Daniel Belisle","email":"daniel.belisle@aofl.com"},{"name":"Micah Blu","email":"micah.blu@aofl.com"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"175f17134b2bc22c172a978361f5e5625ada03ef","tarball":"https://registry.npmjs.org/@aofl/api-request/-/api-request-3.9.0-alpha.0.tgz","fileCount":8,"integrity":"sha512-7LODmboJb5MsM78SbTdfCiwTMGFpRfKh7KH/e2FidJ+okB4i9ulHVw0PoAoMObpoviWrzTpAaHCyy12WXnI8Lw==","signatures":[{"sig":"MEYCIQC8iGjWO4/VyozRzTPbTBpA42/awv+7qAzhfn46ldSFwAIhALfLAwgaZpDlTXwIikb91w8SrZFMjeWZvFoyXvdMUKF0","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27956,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeuvk2CRA9TVsSAnZWagAAAxgQAKRARZSjUHsIUJcp+Fcv\nn7DXJuy1LTkrMUkDhctoyPdzs0tUM8OjsWUNF1t5aa2UnjdeEFZr1KsiEpL3\nadKnVg93bzoLUOkriGr8CfaKFt4MghgjNXzKhMIWdf43dJwJJzUD9j5e7mHv\nQWgmiStAYRly/fFjV2lC4OsDw/FLe7t+GhGHujxG5GJQs/o9RTNPzoYypvWC\nIyCGGD5/01e8NqdXDK5IJO5YgS8f0cFyYvM8lWKKgvYySrNrUHgNRVF7Itwk\ndl4UEm1soQZY21rfXz6wOVHVMy2VzKvR1FTogOVrv0kPl0Q2yawrRkCUkARq\noDWjRKcX4c/PsweESAahYtZwFl/1gb5Sh4kXIGF73hB3PKL1IwjwBlNDq/hD\nnJqj/vUCJRgjS+SkP2mVDmSjujxWPTKUUgJj5d1jhqqrIJMHSzQ9JXGKxzTU\nYA/zpUZdLQmoI2kjvC2oKg2ZFh3PGlN35++7KeYypQzozegrB1+n6wQCzcAa\njdeT1wJPloaQDCajpRq1XVyIu1P4X39FEEwVcWOa53EsFSEYd6PISs3npQVg\n7FPdYo4N0ZMOeqqiNFwjP8XdGwDdC2+/PytzPKo7BbF9su0ONY0f1sBrP9Qe\nZZjpIuKp9gqR+8ZMhNeYDJMPuUn4k3KKIHfV+2vigwdjZkoJXd2rfNjHZXZL\nRvqZ\r\n=wbAt\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","module":"index.js","readme":"# @aofl/api-request\n\nA module for making api calls easier. Key features include caching responses and request/response formatters.\n\nCaching is implemented using @aofl/cache-manager and uses MemoryCache. @aofl/api-request caches the promises created by fetch api.\n\nRequest/response formatting referes to constructing a request payload and parsing the response payload. A formatter object should implement `pack()` and `unpack()` properties. `pack()` is to construct the request payload and `unpack()` is used to parse the response. Any number of formatters can be added to `apiRequestInstance` using the `addFromatter()` method. E.g. `GetFormatter`, `PostFormatter`, `CorsFormatter`, `FileUploadFormatter`, `GoogleMapsFormatter`, ....\n\n[Api Documentation](https://ageoflearning.github.io/aofl/v3.x/api-docs/module-@aofl_api-request.html)\n\n## Examples\n* [Basic Example](https://codesandbox.io/s/github/AgeOfLearning/aofl/tree/v3.0.0/aofl-js-packages/api-request/examples/simple)\n\n## Installation\n```bash\nnpm i -S @aofl/api-request\n```\n\n## Usage\n```javascript\nimport {ApiRequest} from '@aofl/api-request';\n\nclass PostFormatter {\n  static pack(payload) {\n    const headers = new Headers();\n    const body = new FormData();\n\n    if (typeof payload !== 'undefined') {\n      body.append('arguments', JSON.stringify(payload));\n    }\n\n    return {\n      method: 'POST',\n      headers,\n      body,\n      mode: 'cors',\n      credentials: 'include'\n    };\n  }\n\n  static unpack(response) {\n    return response.json()\n    .then((data) => {\n      if (data.status !== 'success') {\n        return Promise.reject(data);\n      }\n      return data;\n    });\n  }\n}\n\nconst apiRequestInstance = new ApiRequest();\napiRequestInstance.addFormatter('post', PostFormatter);\n\napiRequestInstance.request('https://example.org/', {}, 'post', true, 'sample-namespace')\n.then((jsonResponse) => {\n})\n.catch((jsonResponse) => {\n});\n```\n","browser":"dist/index.js","scripts":{"docs":"npx jsdoc -c .jsdocrc.json .","test":"echo \"Error: no test specified\" && exit 1","build":"cross-env NODE_ENV=production aofl build","build-ci":"cross-env NODE_ENV=production aofl build --debug","build:dev":"cross-env NODE_ENV=development aofl build","prepublishOnly":"npm run build-ci && npm run docs"},"typings":"types.d.ts","_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"6.14.5","description":"A module for simplifying api calls","directories":{},"_nodeVersion":"12.8.0","_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jsdoc":"^3.6.3","@aofl/cli":"^3.9.0-alpha.0","cross-env":"^6.0.3","tsd-jsdoc":"^2.4.0","@aofl/cache-manager":"^3.9.0-alpha.0"},"peerDependencies":{"@aofl/cache-manager":">= 3.0.0-beta.1 < 4.0.0"},"_npmOperationalInternal":{"tmp":"tmp/api-request_3.9.0-alpha.0_1589311798306_0.15479401884347133","host":"s3://npm-registry-packages"}},"3.8.1":{"name":"@aofl/api-request","version":"3.8.1","keywords":["aofljs","@aofl/api-request","api request","api","cache response"],"author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/api-request@3.8.1","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"contributors":[{"name":"Daniel Belisle","email":"daniel.belisle@aofl.com"},{"name":"Micah Blu","email":"micah.blu@aofl.com"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"0dad2bd494679ac6c2acfa72cbcf2c5caae5bede","tarball":"https://registry.npmjs.org/@aofl/api-request/-/api-request-3.8.1.tgz","fileCount":8,"integrity":"sha512-vJR9Op9PgekgMOtptw/O8/K4aGQc0GAgufEPmF186/LlLtn96vCLRTT6cZxWq30XH0ZWhRYjRKg3opfm8MaG8w==","signatures":[{"sig":"MEQCIGISQv6HQpYpR2jyhoEOA+nOfYSG6lLc8SqAi9IubRO9AiA48mHMphpxuFQvkih7FBBbah26bx1i2XdNh/ifX2DAtA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27932,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeuvvCCRA9TVsSAnZWagAAvoEP/jX4vc5Ks0sib7BLO6EO\nmhMeUjuPnI3Ht1otMOD17owJn03Smm58LlQzUKTwQlB1+HuETh3HrQ2MjY/8\ntw9qZllFkkq1IuNfJZOeYlzgf9xlDmyOyZ4Kk1MPLnntk+07+PP051enF/m9\nMQqcV4Q5vUWdB8TQ1J1ibBQumq75k0MIr7l0UHdEM2iRjq9x7jW1OdgOOXRt\n/uJQn1r46HAb7RMy+qz26yw0vdZLGD8l6AZMxqQjpx7PcTfg0SAUBYJpcYK6\nawkrU2/G7jVrFPQteU/id9Cda8xMCNgWhPckeh+PpyQuPq+u4s7jXJZmk+Of\ncgWUkMRxHnWGBYubDlWSM3xcRFNtfRHh07xCi5xP/rqCtahOUMfm5/sYsfqM\nXF1U6hCHdmfwGAnY3dihE7Wm1KxbBidBPr2Z3EEakXa24fjw8zkriGy0g7Iz\nd1njuI3pazaFMBNbeB1hk1UwaqCMF7jvY19AKLLQnGstX5PWKxgX78Wnw+nl\nuTTun1JI/pK5AKHstipoRnERwcuAWFWlHbyhjgVBsMK93IqLW3p3Iwz3qCPj\nn1lnaMJR6iAI22HOqycuzmUoDN4snhAO51TsP/HDlQxAn29IchYn4KoUcwZC\n3qjWTU/0WnMq3lz0Dan90nVCOLc2TP5DYnNdft9mrqvAZ53UxBc+EoB2huxB\nafS2\r\n=5pWg\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","module":"index.js","browser":"dist/index.js","scripts":{"docs":"npx jsdoc -c .jsdocrc.json .","test":"echo \"Error: no test specified\" && exit 1","build":"cross-env NODE_ENV=production aofl build","build-ci":"cross-env NODE_ENV=production aofl build --debug","build:dev":"cross-env NODE_ENV=development aofl build","prepublishOnly":"npm run build-ci && npm run docs"},"typings":"types.d.ts","_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"6.14.5","description":"A module for simplifying api calls","directories":{},"_nodeVersion":"12.8.0","_hasShrinkwrap":false,"devDependencies":{"jsdoc":"^3.6.3","@aofl/cli":"^3.8.1","cross-env":"^6.0.3","tsd-jsdoc":"^2.4.0","@aofl/cache-manager":"^3.8.1"},"peerDependencies":{"@aofl/cache-manager":">= 3.0.0-beta.1 < 4.0.0"},"_npmOperationalInternal":{"tmp":"tmp/api-request_3.8.1_1589312450464_0.8124350197734156","host":"s3://npm-registry-packages"}},"3.9.0":{"name":"@aofl/api-request","version":"3.9.0","keywords":["aofljs","@aofl/api-request","api request","api","cache response"],"author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/api-request@3.9.0","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"contributors":[{"name":"Daniel Belisle","email":"daniel.belisle@aofl.com"},{"name":"Micah Blu","email":"micah.blu@aofl.com"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"d88f955694a97a1282ea495d247fa084fec826ea","tarball":"https://registry.npmjs.org/@aofl/api-request/-/api-request-3.9.0.tgz","fileCount":8,"integrity":"sha512-uecbnvfg6XnEwIVOLpBN/N23CMe3lpXPkASPDqrgpypEpSKnlj4KhW+i6iXR4kM4R56qX5O+/Cv9DO/UTEBA/Q==","signatures":[{"sig":"MEUCIE5Xd+67oKffFw0rZjG1DpgrJwulsM8tuRIdv34bqG/5AiEAycUXF0rxrCX6iHMTVN8eHo4imJe81bJjD80puOp6mdA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27932,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJevtgzCRA9TVsSAnZWagAACMIP/RjYRBnaDfTmj0AwFsbI\n1ROrh8BNYdreEjtmjDicNROHxXJb7sg3S5pIZC42s9yyW4S2bge2ZwYRoGdd\n7aViTlEZ7X1kETm7nU155WrUX5t+UXeqeKj2kE4+G78pbV0vsMm4+QBZN9F6\nSOrhmFR88yen55gR3y60sear0qyTMdKeZs26qinW3mcWv9q5XOPfMjtjC2xi\nlnW0o4wqVjIUvWPWO8ubmNxYHMXoMjO+U4R4a1ltdjrVkXFxW4FSgOA9pysp\nYTxuGZB5s0319MB4ikXg4oO9bqGlBNqkNLHcDgIUcj3kY1X+cd9F1UQtfwdc\nqdrDUb+37CZZUtpiCwRHMy5dNKPodXGULTIpQu/t24xGaMzjJ1YAQvXiMJ36\nKUHMmLiGdUPEJpLpObDzuAdwkePnZ+LWmJvm+erR+DcZ0ffs1Vj0vEHqNzcT\nnozPrZVQcImuGJIc+zuDVJOubU24UXyoF3D9WBBkFOQGhb+QL33HxQFILkKB\nN5YdLoaTiB1lCv2ZsZBvDTL3UhMzOFI27gPvV3WTTEL06Zgqan/2jwAVlMaG\nMogkNZFFpW7uhtHJcBH5cQiOeOp4Uvlf+hGhyNnxvCtWZFMDlZACst/Pa68h\n4Yxkprl5AP3OxQJP7LTFl8SGZPGAU1BtQD8RXjTgNq5VopA4poik1zTGLuDN\nZvip\r\n=uhTa\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","module":"index.js","browser":"dist/index.js","scripts":{"docs":"npx jsdoc -c .jsdocrc.json .","test":"echo \"Error: no test specified\" && exit 1","build":"cross-env NODE_ENV=production aofl build","build-ci":"cross-env NODE_ENV=production aofl build --debug","build:dev":"cross-env NODE_ENV=development aofl build","prepublishOnly":"npm run build-ci && npm run docs"},"typings":"types.d.ts","_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"6.14.5","description":"A module for simplifying api calls","directories":{},"_nodeVersion":"12.8.0","_hasShrinkwrap":false,"devDependencies":{"jsdoc":"^3.6.3","@aofl/cli":"^3.9.0","cross-env":"^6.0.3","tsd-jsdoc":"^2.4.0","@aofl/cache-manager":"^3.9.0"},"peerDependencies":{"@aofl/cache-manager":">= 3.0.0-beta.1 < 4.0.0"},"_npmOperationalInternal":{"tmp":"tmp/api-request_3.9.0_1589565491392_0.8393799426346897","host":"s3://npm-registry-packages"}},"3.10.0":{"name":"@aofl/api-request","version":"3.10.0","keywords":["aofljs","@aofl/api-request","api request","api","cache response"],"author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/api-request@3.10.0","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"contributors":[{"name":"Daniel Belisle","email":"daniel.belisle@aofl.com"},{"name":"Micah Blu","email":"micah.blu@aofl.com"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"6e0040e587f47320d8365befa61c54116970be91","tarball":"https://registry.npmjs.org/@aofl/api-request/-/api-request-3.10.0.tgz","fileCount":8,"integrity":"sha512-qUWoJbL3ZhQHs9vYcBYoLksvyg1a0FwFYKuNo0sA//9b/jg4v1vDbg6KRBX818n0V3YDSw7ADC5HzpEhyCpE+Q==","signatures":[{"sig":"MEUCIQCLdhSsTy0KUBpsWUdC2ZEk6xql3cHS3sjGpREhq2hVjgIgVLAyCov+paIK5TGb7cm4RRD7LdbyvB0fM/1GyiIHY/s=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27935,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJevwZvCRA9TVsSAnZWagAAjiYP/02tdONEuTH5pMplDTdZ\nzttwnA/SdOpxGHLdyQM6kPMb51EajUIN3Y98xzGhsY8YLzT63vDZqxmKAuIo\nKpH1K+iy6TtaTTCoDhzpDSlJpdzdioEy5O3hNRkTRgaNE59J9ufwdvS+dcBz\ndRP1wH0F1dFAzMgajXBoOkeMmrnlcu85vPyqvhUn1m+Z0jlzdiSvmZXQBDlw\n97rqdTajOYfk9+PV4n/whL+VqZeE0MjVrrysL3rLzpaAbE5Wj4jUM3IVnum6\nBu5G5q8JC6k0ntJ45/Av/nCyj0MqVhN3iOaOpGIv5w09NOki1e9vFZ8+sEsM\ntL3SSX3CNSHpqXwWf/BTRcNVzIfpOyL0Dptf8vGQabpaL8Xqtpg5Bg+JhgiH\n66isQXlc2vxIhG7+Zy54opaL8XmUGnYqexgFNG1bG004urv2G19HgUYOBFLV\nXFgXnJvPNON1BjLPG4ywU8mTMJzr+16x9mVKtiSxfMYuSBL07LX8n2Mtv2Fr\nCuPj/DVmU2o468Gy67vBoh3+WF7jEPlvj3fbtwVsTcnx+myhtN6FADiE120y\n6yYXajeQA91wz5288sbpXsvQnGvt2k9nXO8hMVJ4tt4LOn2FEEPe6nfjcnZi\nD7H+06Vc1f44rlUcgwtWkVZG4CwmlGTfNXZAsNKgc8UYPzbD0llQyTZiWWD4\nWH3N\r\n=skVX\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","module":"index.js","browser":"dist/index.js","scripts":{"docs":"npx jsdoc -c .jsdocrc.json .","test":"echo \"Error: no test specified\" && exit 1","build":"cross-env NODE_ENV=production aofl build","build-ci":"cross-env NODE_ENV=production aofl build --debug","build:dev":"cross-env NODE_ENV=development aofl build","prepublishOnly":"npm run build-ci && npm run docs"},"typings":"types.d.ts","_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"6.14.5","description":"A module for simplifying api calls","directories":{},"_nodeVersion":"12.8.0","_hasShrinkwrap":false,"devDependencies":{"jsdoc":"^3.6.3","@aofl/cli":"^3.10.0","cross-env":"^6.0.3","tsd-jsdoc":"^2.4.0","@aofl/cache-manager":"^3.10.0"},"peerDependencies":{"@aofl/cache-manager":">= 3.0.0-beta.1 < 4.0.0"},"_npmOperationalInternal":{"tmp":"tmp/api-request_3.10.0_1589577327094_0.5277111217485497","host":"s3://npm-registry-packages"}},"3.12.0":{"name":"@aofl/api-request","version":"3.12.0","keywords":["aofljs","@aofl/api-request","api request","api","cache response"],"author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/api-request@3.12.0","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"contributors":[{"name":"Daniel Belisle","email":"daniel.belisle@aofl.com"},{"name":"Micah Blu","email":"micah.blu@aofl.com"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"e9f172759b059c0153028ef41cecf63f22768a58","tarball":"https://registry.npmjs.org/@aofl/api-request/-/api-request-3.12.0.tgz","fileCount":8,"integrity":"sha512-J8yqUT8MjdAp8pVWPJmyBczf85Tk/fjk5jvOLuGcbIZfbNsYp0lNP9VE+Kj/9hLWEvwV7GNBnNKDHWgamwB/uw==","signatures":[{"sig":"MEUCIFwDrjUDV3s3ryiq/rcGBmZ6pndOZC1aBfF3a3BFxiXcAiEAkwRAqUGnKDkhQnY6IhREmCQ3GMrEYtpyhioD12D8Xv4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27935,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgB3LqCRA9TVsSAnZWagAAKT0QAJ/gKMtXTpgTMANUTflP\n6S/8ePRJMnpF3SJTlJdjyf2++scSXbNjdOGfJ+l4jk3Qvz3tlYQEAWuo5kFs\nrE+NNQQdLqtIol/KRsmPq9ruIWBEsXh4DD6T231kgElvPCYcBAYQIdCuCTyG\nZL0Zrw+OQR032pIR986u8KGNOJh9ZCNyRnaX8xLGN+RldiHzTSxn7EboqEUy\n1/LsEczfCBz33HKz8JPXz7/74lFPxBNTS0GKZ23gYxNH3e8RSbn2T3l7tI1X\nKzOWyD8lur20vcQ7HhLZIwQSwP4OaqokKDBJOp0VGE9x02joJ4o4u4AkldK/\nik04IG8GvLcnN7BW8Zkkl7fe3xuCtKNIutyOl+40DHTaRpg/Pt3j9K7WotyK\nlPwKv0JDI56tCmtsAHTy89QVzFd3KQvTZUNDbadnInwmkLV1rkvOwKfB03aA\nbzszm9QSZbPnOH/JB8uI0o1c3JsyEv7LC3cedy+VM2BGDxhmA7d0kX0DJC8Z\n7GGQBn9okwcKVxdNhdZyuhWTSMxbm97iHPEkuoysoFCyK7cBBzK0DlmXefkK\nLLeTLFOtmND8ZaFzXcwUcVOGVjsuXwQKBux2Mb8UbfpPNQsonytI7BHEYRO8\nnuK/10K0pkzfdhwK8bTysL/6LA8r0DBrGQkY4/QuIf2R/WDMk/e6sQUCRHCI\nqWhv\r\n=UNnx\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","module":"index.js","browser":"dist/index.js","scripts":{"docs":"npx jsdoc -c .jsdocrc.json .","test":"echo \"Error: no test specified\" && exit 1","build":"cross-env NODE_ENV=production aofl build","build-ci":"cross-env NODE_ENV=production aofl build --debug","build:dev":"cross-env NODE_ENV=development aofl build","prepublishOnly":"npm run build-ci && npm run docs"},"typings":"types.d.ts","_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"6.14.4","description":"A module for simplifying api calls","directories":{},"_nodeVersion":"12.16.3","_hasShrinkwrap":false,"devDependencies":{"jsdoc":"^3.6.3","@aofl/cli":"^3.12.0","cross-env":"^6.0.3","tsd-jsdoc":"^2.4.0","@aofl/cache-manager":"^3.12.0"},"peerDependencies":{"@aofl/cache-manager":">= 3.0.0-beta.1 < 4.0.0"},"_npmOperationalInternal":{"tmp":"tmp/api-request_3.12.0_1611100906313_0.8945838828103241","host":"s3://npm-registry-packages"}},"3.12.1":{"name":"@aofl/api-request","version":"3.12.1","keywords":["aofljs","@aofl/api-request","api request","api","cache response"],"author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/api-request@3.12.1","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"contributors":[{"name":"Daniel Belisle","email":"daniel.belisle@aofl.com"},{"name":"Micah Blu","email":"micah.blu@aofl.com"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"7188764cfabf489e7b7671e3ea8ee175039cb230","tarball":"https://registry.npmjs.org/@aofl/api-request/-/api-request-3.12.1.tgz","fileCount":8,"integrity":"sha512-fBkbMp8FUkff4J+cg1yjIz5OpO1lWD2EXzVbd7m2blTtGEnwaMlfup7Y8/8JJdf0QWpNeKT/LsJT9hv/3Nog6w==","signatures":[{"sig":"MEYCIQD9GzoWXpp4P8ytMZmC7kNSOmfbsNs2lq2j89lbgztkSwIhAJJaiqiBvar3Tulf6XC0/aecSFA8wWTU7rc4oNR6PgYo","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27935,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgB3V8CRA9TVsSAnZWagAAXs4QAIwA6iNYZw1o0Y8+06Fd\nN8+bNta4cYu8Uq2hLcIy1ZUyHjDxJaDP0dyl6IgKGcygHcVK++DhW9+npGw0\nWKHv6ACKfgRoPvfFk0kANR/a1S4NHZ3L0XUjyMquKhHBJWpG2rSpIM/OVhJ+\nWdG/Yv6IIB0TxspwfvpwN57evupUelm834FdBkwKfwn+moVCl/dHaplrovZR\n+xfRiYbKnoUp7UINA+J5rnTyIdunlImzcryevEObjGOQzG9ORa7erC9OSntx\nd8MCY0F+Rg+qUE70Hxn7ptN1ZscIk30Li+3Skd5eMP2MGy49Iaezdtd2Qjqs\n81M5Wb0lMuAsT4eY5ooXC9wqF53NsbIwl23+Szkh4CsZrIzfdg28yWco7D6h\nPxba3LxKwGbFIDIop2ItXnPayCneFaWh7DwlDXaw5XGR+dN4Nb9QGbV50DM+\nvhHfxNrDX9qxlBTcmJT3U3uRUIc4GGyy6rf4zRPD4xQy46ygD4qbL04kyz7d\n1E2eziYdg125SjwrzVALrRrwaZNTkPIE3Jxend/ofjkGwx6ZZllcEQZyfL78\nLEekplrjtYem5dyjFQxyqKZtxDOa9VtJtHCuIT3zWQD+46ysdYs6wbHVFnIg\nq+Aova8Vz4tp/xgsL0dEURz4gJyNyiZp3V4zKceWe1E1v1HjvjYQEZWrtQch\nrENF\r\n=MuKv\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","module":"index.js","browser":"dist/index.js","scripts":{"docs":"npx jsdoc -c .jsdocrc.json .","test":"echo \"Error: no test specified\" && exit 1","build":"cross-env NODE_ENV=production aofl build","build-ci":"cross-env NODE_ENV=production aofl build --debug","build:dev":"cross-env NODE_ENV=development aofl build","prepublishOnly":"npm run build-ci && npm run docs"},"typings":"types.d.ts","_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"6.14.4","description":"A module for simplifying api calls","directories":{},"_nodeVersion":"12.16.3","_hasShrinkwrap":false,"devDependencies":{"jsdoc":"^3.6.3","@aofl/cli":"^3.12.1","cross-env":"^6.0.3","tsd-jsdoc":"^2.4.0","@aofl/cache-manager":"^3.12.1"},"peerDependencies":{"@aofl/cache-manager":">= 3.0.0-beta.1 < 4.0.0"},"_npmOperationalInternal":{"tmp":"tmp/api-request_3.12.1_1611101564484_0.924760522487843","host":"s3://npm-registry-packages"}},"4.0.0-alpha.9":{"name":"@aofl/api-request","version":"4.0.0-alpha.9","keywords":["aofljs","@aofl/api-request","api request","api","cache response"],"author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/api-request@4.0.0-alpha.9","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"contributors":[{"name":"Daniel Belisle","email":"daniel.belisle@aofl.com"},{"name":"Micah Blu","email":"micah.blu@aofl.com"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"285f4f9ac5c1e597e558cd8c9d83056e76fc5592","tarball":"https://registry.npmjs.org/@aofl/api-request/-/api-request-4.0.0-alpha.9.tgz","fileCount":8,"integrity":"sha512-mOeT5/PsyjS7iBYezZCZneuEN6WwWO7u+l6ooOXOZlfOrnXgDHpCgqVe+QAMK/Mn9xqhg7KO/1tR2iRMDqM1dw==","signatures":[{"sig":"MEUCIBpFZgrqTzXwwpK1O4mebWbXRfBlZHeGn59/bGJgYiswAiEA5QO2Pd71kMFizAXs33VfgQxbmr9qoDC6qmO/swHvQ/c=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":25876,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgGgDWCRA9TVsSAnZWagAA5pMP+wd9eS/3TulNbAzvsntS\nZdyg3orN6u+3hdLNiyl8QPc1mskulRLX7mHAm8iyA5nspil/WjAvtMWye3A1\nuFM0AEbzONoViqn1WibLgWkcSBlI76FbKoWDAYmRBCezYNSNQEff/Cf/Cgaf\nr5okUA5KdrkpN3qmqalxYAi8UGJRFtFxiGfFgJpsgv6ZYWdJCo7GsM9KGG6n\nPxlQtn1tWVWFOFzDqEF0AhazCEjLs4Hoiba1o9uxeqzbiFFZ09W2FF1vAxrw\nicrAhl1yPFsjxfFXg8Rr8qbMHJnSoGAs9rxg26C9QswJiNucmoyNiW4PuG8j\nrIFXSVcb0kpiC0xxo90lefJuKehm+QNCDfxlKRXWAIySBxgkzj1P/2Who1po\nbQX03WDSM/tSFFEsrQDzY8KzgdbbS8n0aM+TrGec3BJlHecJjHfMwlpdBzgW\n8MUbraAA0+AQCgk9mMDyJ2ame796rHGx52egnP456xV5XHe2CiVRiqSnoiYv\nepvp8HnMTe7OekY3bbusnLnBkkCqRHJaackwpKKIOtWduqfdJ6fbtSijoXsn\nwl6nP3+YeTs6HlG1iM5iktPmzyzsni7Tcg6Z3j3dWnMky+enDMVb5T/acOVi\nYL4RhmtstRQ/3YPxrHdmAtU3cYig5e4IYUQLsts1wI7tjemBBZW7sgk2ousQ\n3omO\r\n=92ri\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","module":"index.js","readme":"# @aofl/api-request\n\nA module for making api calls easier. Key features include caching responses and request/response formatters.\n\nCaching is implemented using @aofl/cache-manager and uses MemoryCache. @aofl/api-request caches the promises created by fetch api.\n\n\nRequest/response formatting refers to constructing a request payload and parsing the response payload. A formatter object should implement `pack()` and `unpack()` properties. `pack()` is to construct the request payload and `unpack()` is used to parse the response. Any number of formatters can be added to `apiRequestInstance` using the `addFromatter()` method. E.g. `GetFormatter`, `PostFormatter`, `CorsFormatter`, `FileUploadFormatter`, `GoogleMapsFormatter`, ....\n\n[Api Documentation](https://ageoflearning.github.io/aofl/v3.x/api-docs/module-@aofl_api-request.html)\n\n## Examples\n* [Basic Example](https://codesandbox.io/s/github/AgeOfLearning/aofl/tree/v3.0.0/aofl-js-packages/api-request/examples/simple)\n\n## Installation\n```bash\nnpm i -S @aofl/api-request\n```\n\n## Usage\n```javascript\nimport {ApiRequest} from '@aofl/api-request';\n\nclass PostFormatter {\n  static pack(payload) {\n    const headers = new Headers();\n    const body = new FormData();\n\n    if (typeof payload !== 'undefined') {\n      body.append('arguments', JSON.stringify(payload));\n    }\n\n    return {\n      method: 'POST',\n      headers,\n      body,\n      mode: 'cors',\n      credentials: 'include'\n    };\n  }\n\n  static unpack(response) {\n    return response.json()\n    .then((data) => {\n      if (data.status !== 'success') {\n        return Promise.reject(data);\n      }\n      return data;\n    });\n  }\n}\n\nconst apiRequestInstance = new ApiRequest();\napiRequestInstance.addFormatter('post', PostFormatter);\n\napiRequestInstance.request('https://example.org/', {}, 'post', true, 'sample-namespace')\n.then((jsonResponse) => {\n})\n.catch((jsonResponse) => {\n});\n```\n","browser":"dist/index.js","scripts":{"docs":"npx jsdoc -c .jsdocrc.json .","test":"echo \"Error: no test specified\" && exit 1","build":"cross-env NODE_ENV=production aofl build","build-ci":"cross-env NODE_ENV=production aofl build --debug","build:dev":"cross-env NODE_ENV=development aofl build","prepublishOnly":"npm run build-ci && npm run docs"},"typings":"types.d.ts","_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"7.5.2","description":"A module for simplifying api calls","directories":{},"_nodeVersion":"14.15.4","_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jsdoc":"^3.6.6","@aofl/cli":"^4.0.0-alpha.9","cross-env":"^7.0.3","tsd-jsdoc":"^2.5.0","@aofl/cache-manager":"^4.0.0-alpha.9"},"peerDependencies":{"@aofl/cache-manager":">= 3.0.0-beta.1 < 5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/api-request_4.0.0-alpha.9_1612316886281_0.09371511533093035","host":"s3://npm-registry-packages"}},"4.0.0-alpha.10":{"name":"@aofl/api-request","version":"4.0.0-alpha.10","keywords":["aofljs","@aofl/api-request","api request","api","cache response"],"author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/api-request@4.0.0-alpha.10","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"contributors":[{"name":"Daniel Belisle","email":"daniel.belisle@aofl.com"},{"name":"Micah Blu","email":"micah.blu@aofl.com"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"454ff80b305de4086f2cd7132d49f4cd6c24c421","tarball":"https://registry.npmjs.org/@aofl/api-request/-/api-request-4.0.0-alpha.10.tgz","fileCount":8,"integrity":"sha512-0lcvAlsVZLyBlEpuugYlanG2S/iqDpVwcdiW32L6wjw+gqxk/Ukw7dnki0YY48wJpUEsAKjd+XAjsFIk7vXKFw==","signatures":[{"sig":"MEUCIClaKlvvJos7sBUwuqYWaird157Q3i1tV0mi3M5E+xFkAiEAn/79nRXk6/9X/LVMp/TvAhsawu3DzdyzTqlw0EX7f2E=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":25870,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgGgK8CRA9TVsSAnZWagAApksQAJ645AlQ/I1gxj1X6fZL\n4MFsKTN3OMYyCycm0bRwzHbpJ4RuvknHCCBYimzF+Ly2MHpnP6kEb/6FiVdT\n0XJ6Jrh9FGO7FCt74kdwSStPTf8Q9aBrx8JU9+U4UFzTT+f/sSBXSlS2h7K1\nFY7+CPW6/rRRWLHhngkZKVbSkoq06PgLnxM6WKRUYcyl6+9PHo6ihNVCYED2\nqvtwDYRDqX24MjK/5CP9Q0XHFm7YRvWTapP8/TyH2vRigfCVmRNenyaqiCTx\nwWEwsT23s1rABhTf5b86NrnaZeNM9cU44UjPML+wGa+1dlPQOo/ZXECip8Nv\n9dEiXMl65k9sGyMcgnLPMdLuCqSLcNyH9YZaAtMEPhOePuaEveCVffkLMYM1\n9DjEZpR5zc0+6oGrTx84Ne7WqGGQay/8QMT6hgELzQe0HOhgy4T+opBfKfan\nYCOszY5l4sDG2EJ5M3oabP8ei0uExeiOeUZauVkU+h7OYIomyeLip6yAc97W\nwFaoZn8Wr5a11pTXNZVDO11bmA6fSlqb9avt9U1VZfmRwGjbTlEyF1rE1K4Y\nQn9jCtxV6gqbWgyGxVZat/UMLhQvVyxvlzVNgMUEoRahbenxSY67XJHLK0fY\nwmU325w6iwNqYj1OnyU4AggnZQ8aRf3YorLVVL35Lc1aWDtlKp1wN6iEcp2W\niVbl\r\n=CLiT\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","module":"index.js","readme":"# @aofl/api-request\n\nA module for making api calls easier. Key features include caching responses and request/response formatters.\n\nCaching is implemented using @aofl/cache-manager and uses MemoryCache. @aofl/api-request caches the promises created by fetch api.\n\n\nRequest/response formatting refers to constructing a request payload and parsing the response payload. A formatter object should implement `pack()` and `unpack()` properties. `pack()` is to construct the request payload and `unpack()` is used to parse the response. Any number of formatters can be added to `apiRequestInstance` using the `addFromatter()` method. E.g. `GetFormatter`, `PostFormatter`, `CorsFormatter`, `FileUploadFormatter`, `GoogleMapsFormatter`, ....\n\n[Api Documentation](https://ageoflearning.github.io/aofl/v3.x/api-docs/module-@aofl_api-request.html)\n\n## Examples\n* [Basic Example](https://codesandbox.io/s/github/AgeOfLearning/aofl/tree/v3.0.0/aofl-js-packages/api-request/examples/simple)\n\n## Installation\n```bash\nnpm i -S @aofl/api-request\n```\n\n## Usage\n```javascript\nimport {ApiRequest} from '@aofl/api-request';\n\nclass PostFormatter {\n  static pack(payload) {\n    const headers = new Headers();\n    const body = new FormData();\n\n    if (typeof payload !== 'undefined') {\n      body.append('arguments', JSON.stringify(payload));\n    }\n\n    return {\n      method: 'POST',\n      headers,\n      body,\n      mode: 'cors',\n      credentials: 'include'\n    };\n  }\n\n  static unpack(response) {\n    return response.json()\n    .then((data) => {\n      if (data.status !== 'success') {\n        return Promise.reject(data);\n      }\n      return data;\n    });\n  }\n}\n\nconst apiRequestInstance = new ApiRequest();\napiRequestInstance.addFormatter('post', PostFormatter);\n\napiRequestInstance.request('https://example.org/', {}, 'post', true, 'sample-namespace')\n.then((jsonResponse) => {\n})\n.catch((jsonResponse) => {\n});\n```\n","browser":"dist/index.js","scripts":{"docs":"npx jsdoc -c .jsdocrc.json .","test":"echo \"Error: no test specified\" && exit 1","build":"cross-env NODE_ENV=production aofl build","build-ci":"cross-env NODE_ENV=production aofl build --debug","build:dev":"cross-env NODE_ENV=development aofl build","prepublishOnly":"npm run build-ci && npm run docs"},"typings":"types.d.ts","_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"7.5.2","description":"A module for simplifying api calls","directories":{},"_nodeVersion":"14.15.4","_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jsdoc":"^3.6.6","@aofl/cli":"^4.0.0-alpha.10","cross-env":"^7.0.3","tsd-jsdoc":"^2.5.0","@aofl/cache-manager":"^4.0.0-alpha.10"},"peerDependencies":{"@aofl/cache-manager":"^4.0.0-alpha.9"},"_npmOperationalInternal":{"tmp":"tmp/api-request_4.0.0-alpha.10_1612317372408_0.9159955848711812","host":"s3://npm-registry-packages"}},"4.0.0-alpha.11":{"name":"@aofl/api-request","version":"4.0.0-alpha.11","keywords":["aofljs","@aofl/api-request","api request","api","cache response"],"author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/api-request@4.0.0-alpha.11","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"contributors":[{"name":"Daniel Belisle","email":"daniel.belisle@aofl.com"},{"name":"Micah Blu","email":"micah.blu@aofl.com"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"62a06b7dda0a8e2bc6c1fb7146d1b60e3326935f","tarball":"https://registry.npmjs.org/@aofl/api-request/-/api-request-4.0.0-alpha.11.tgz","fileCount":8,"integrity":"sha512-w/mqP3MP09ZnYdebpJihjpbQS0/nMcUmXHTI+ZxOKHd23FhaTL932832+Ck5+nrW3iiZCNKTer6KEpuh7c0wQw==","signatures":[{"sig":"MEQCIGcW7JTeb2+Ei2DDpALt9t60uMPR06RQjjIBSIvRV9IaAiAy8zimcpcxU97efob+AsWQJN+W7pEvBgfpZ7phvFcLZQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":25870,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgGglQCRA9TVsSAnZWagAAQYcP/2vL48Pm4b6n7iqnCzIe\nGbhC7fQ6KDu6dPjdIHkDXoUhNZV7JyMyJGNR9qWkdjFXby/4kzBF55LGnDe9\nrLlgwaDyvK7+m1c8S3a4+HNZ6wHp4y7frOwKQBhf7EIwdkXD0OxDgQjXH/z6\nBH16qz3QwKEzI2ckNzjykpRLXarutF6khZo3D2fyyz9TnISduf5By+jN4Pa0\nlcjYz3GjN7YnWfUsJHtrkWyo/u3BEDL6XMLgB/wD6Ss2KwthLxVST0VDPMze\nNSy3XYpgyvgPWZi09vhuh4ujXg2J0h0vmnq7OnlDpSHe/tZQo55zxLI2P41U\n0Cx+tQ1RVDwDLe9zfVJJtomtKks6ZLBIHMo4/M6XiP49ELcNhdl+ZDsTvrwi\nE/M06Jp+/rUhHm95BxKGlcNInbkaHPcdhmM2mxW2dEjlxc1t5aBzhQtGQUrF\njsNajF0fi/od8r8iwFdgzUWSh+hWW9gt3fjrcukpF6dFsizWs9JK9/TLhI+m\nTUrHliBSc34Cff2/YYI+RMIrorfToJAIeoGA1chlllHkO5Y3nWM2Rrxaf/CK\nuj3hhpug+I9aMF0DKip+4Y4eZVToSSIWVLPKSaN6GpJ/sqXG7CsKh05Yj4Jv\nj+3qvzQpXFi14KN+a/f4o3TkNGppbapUaKX3FPwr4aCSmjVjRt6MxyXc1PhX\n83e1\r\n=tZpK\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","module":"index.js","readme":"# @aofl/api-request\n\nA module for making api calls easier. Key features include caching responses and request/response formatters.\n\nCaching is implemented using @aofl/cache-manager and uses MemoryCache. @aofl/api-request caches the promises created by fetch api.\n\n\nRequest/response formatting refers to constructing a request payload and parsing the response payload. A formatter object should implement `pack()` and `unpack()` properties. `pack()` is to construct the request payload and `unpack()` is used to parse the response. Any number of formatters can be added to `apiRequestInstance` using the `addFromatter()` method. E.g. `GetFormatter`, `PostFormatter`, `CorsFormatter`, `FileUploadFormatter`, `GoogleMapsFormatter`, ....\n\n[Api Documentation](https://ageoflearning.github.io/aofl/v3.x/api-docs/module-@aofl_api-request.html)\n\n## Examples\n* [Basic Example](https://codesandbox.io/s/github/AgeOfLearning/aofl/tree/v3.0.0/aofl-js-packages/api-request/examples/simple)\n\n## Installation\n```bash\nnpm i -S @aofl/api-request\n```\n\n## Usage\n```javascript\nimport {ApiRequest} from '@aofl/api-request';\n\nclass PostFormatter {\n  static pack(payload) {\n    const headers = new Headers();\n    const body = new FormData();\n\n    if (typeof payload !== 'undefined') {\n      body.append('arguments', JSON.stringify(payload));\n    }\n\n    return {\n      method: 'POST',\n      headers,\n      body,\n      mode: 'cors',\n      credentials: 'include'\n    };\n  }\n\n  static unpack(response) {\n    return response.json()\n    .then((data) => {\n      if (data.status !== 'success') {\n        return Promise.reject(data);\n      }\n      return data;\n    });\n  }\n}\n\nconst apiRequestInstance = new ApiRequest();\napiRequestInstance.addFormatter('post', PostFormatter);\n\napiRequestInstance.request('https://example.org/', {}, 'post', true, 'sample-namespace')\n.then((jsonResponse) => {\n})\n.catch((jsonResponse) => {\n});\n```\n","browser":"dist/index.js","scripts":{"docs":"npx jsdoc -c .jsdocrc.json .","test":"echo \"Error: no test specified\" && exit 1","build":"cross-env NODE_ENV=production aofl build","build-ci":"cross-env NODE_ENV=production aofl build --debug","build:dev":"cross-env NODE_ENV=development aofl build","prepublishOnly":"npm run build-ci && npm run docs"},"typings":"types.d.ts","_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"7.5.2","description":"A module for simplifying api calls","directories":{},"_nodeVersion":"14.15.4","_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jsdoc":"^3.6.6","@aofl/cli":"^4.0.0-alpha.11","cross-env":"^7.0.3","tsd-jsdoc":"^2.5.0","@aofl/cache-manager":"^4.0.0-alpha.11"},"peerDependencies":{"@aofl/cache-manager":"^4.0.0-alpha.9"},"_npmOperationalInternal":{"tmp":"tmp/api-request_4.0.0-alpha.11_1612319056050_0.27033443825436554","host":"s3://npm-registry-packages"}},"3.13.0":{"name":"@aofl/api-request","version":"3.13.0","keywords":["aofljs","@aofl/api-request","api request","api","cache response"],"author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/api-request@3.13.0","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"contributors":[{"name":"Daniel Belisle","email":"daniel.belisle@aofl.com"},{"name":"Micah Blu","email":"micah.blu@aofl.com"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"23e0cbfa946ca9baf6d9c36c3084391487406eb1","tarball":"https://registry.npmjs.org/@aofl/api-request/-/api-request-3.13.0.tgz","fileCount":8,"integrity":"sha512-fyP4KLcknlnpTcnkhnf7zRbjuW4f0LaCTIPL6caQjbjCnBiekV2JR6eNFpvsQueJ0p0Qnv5JbLefYHzQeee2tw==","signatures":[{"sig":"MEUCIQDitlKjmDOJ3co8oNBkG90Os/VBk0+DU3DKNT6C5/qNwwIgZuHlPPTCApV5pRK4sX+uFumMA43PggefTaepRD+E7MQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27528,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgODYkCRA9TVsSAnZWagAATBYP/0Ra2ipwZ7FABjSsQtXH\nf8yQ4wC6Bfdv3w1osklUh/Vz+OBetVOD0WEad1p2iLIlm6GILguYuAjsvUWZ\nK9bJVYUm712wX5+WzW4Myc62H4gv3yFgV7R1ZrTOiDutGjiPJMlv3nGhtPxo\ngQ3M6EPdhvisjnmo8BI7XjURABQ8zvmhAxMy5MUP9OJNA5y13Yk8qYxBwxM1\nfT19vm8wnLLFQ7nbbBS2NrH+BMani4XqtQ+kIpD6CiePfpzaWjDA2HNcCu11\nt8FIpzot/CZCYmko1NM4xvEzbMDASBVkcy7R/YQICAOI1BZ9WcbXqCqaNiAE\n6kfce3sFCi9PMYt+5mLWW5GfofEnvcWuU/FlWVzfSKRqXqPdfTddhF7m4bog\nGPOS+xA4Q3xhKG95olh3twVHzyj4928Me97+vTKNkH1DpH9yTGakHolry/Xi\nTK76nCgPr5toMA4bRax2XZzpDlmfaIsCDPVgRvbyD/35qZYO6AVMmtKSmEey\nlwjWBKKhdLk4ZTN6lQUkIghLNxlg9weCe87uR+Ib9+26uqXhJ2bLaWwIW72Y\nIevmFcXjUnr+4B1R1AV1Q/DkA+ykAWUhiZeaOzShhPVOWeo6Hd33cO4ScsMT\n9ZFLEIhIzxw1prO0oWXS9ThmUdZAy/DwW/8tifz0WQTT1GLJ9f+yHRw+wIoQ\nS3IX\r\n=n+74\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","module":"index.js","browser":"dist/index.js","scripts":{"docs":"npx jsdoc -c .jsdocrc.json .","test":"echo \"Error: no test specified\" && exit 1","build":"cross-env NODE_ENV=production aofl build","build-ci":"cross-env NODE_ENV=production aofl build --debug","build:dev":"cross-env NODE_ENV=development aofl build","prepublishOnly":"npm run build-ci && npm run docs"},"typings":"types.d.ts","_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"6.14.11","description":"A module for simplifying api calls","directories":{},"_nodeVersion":"12.20.1","_hasShrinkwrap":false,"devDependencies":{"jsdoc":"^3.6.3","@aofl/cli":"^3.13.0","cross-env":"^6.0.3","tsd-jsdoc":"^2.4.0","@aofl/cache-manager":"^3.13.0"},"peerDependencies":{"@aofl/cache-manager":">= 3.0.0-beta.1 < 4.0.0"},"_npmOperationalInternal":{"tmp":"tmp/api-request_3.13.0_1614296612406_0.015206905672320303","host":"s3://npm-registry-packages"}},"3.13.1":{"name":"@aofl/api-request","version":"3.13.1","keywords":["aofljs","@aofl/api-request","api request","api","cache response"],"author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/api-request@3.13.1","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"contributors":[{"name":"Daniel Belisle","email":"daniel.belisle@aofl.com"},{"name":"Micah Blu","email":"micah.blu@aofl.com"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"7dbfcb3cf4af1a6d2e01021cbd1a0c8a6a7538ba","tarball":"https://registry.npmjs.org/@aofl/api-request/-/api-request-3.13.1.tgz","fileCount":8,"integrity":"sha512-p5OV+TcD622LuSrrXyukqdlCbPRC5Qkote3hwLeYw6a0wBe6EOIAZcxNN3M0FQqBxQmMsHYDyM+UL57Mby/KIQ==","signatures":[{"sig":"MEUCIQDaWBQ4u4blILN9gybkWFf9wZHlONxp/E+6Dzec0hB3UgIgGXTzd36k2SXyrAVIUHL2EOZNBA8mygv5fG0I9EOwluU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27528,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh11p4CRA9TVsSAnZWagAAzvgP/38iKGGUD8mm+WjLQt11\nysVOfD7U8GyzQDl5FkDuQ0Jkn4TzzBYAbEU8eAz+A3EjOnIdhVlEdesEBAHq\nJWw0BLd+JgyjC1Pi98/VpjDw1J+Ufc39xHVhQjuUrolEoaaYhh4sw9x733Ld\nAnKJommh+bwbXm/+rteKwJ4R2HIO2j/A3yQ1BLpFk2flRYxZhaVxDkEfxRNx\nCXhN/TExYKAfYAlV3zb6U8hy0EpomJuKzt0JcJCX8akm/P23443XqgkBab1R\nScOsY9Y4BQvcsF1ZFU7BfrwG5XGKY+wOhkeHTY0wwrhSoPShkULbzWwz29Zs\nxbEMRFBgGwZfnsMLJwQAg6wvG0HVz1yhqu2vaZ3Jdf27YYaPDVDv8dQm5crF\nI6MEpA1tcZoV8tYjyn4hD56KmiJOmMFuaugWZWIs+AAYR2YKqZ9PS7fwLTBz\neZirjzLinEBorbLzOiDLSdIEIecMbcglq8yRN4EwCIOXJtvrhkiKryWlrv3o\ntf3dissaMJv/CiLleWpWQFip0s1hhC+/CGKQr09j1lRNyv28PEumBGbIOS4C\neWhmIhoYLu5shCgcqiBMTTcNR0ij+EGsisHbAedmGvJKZw/X0NzX55/Zu18R\n7Xr4yhRO3i2msyaPZsphaz0UqXmoNdLc+Ght48/taERrizf39MKPuEsuBtY1\n73Dq\r\n=+dqa\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","module":"index.js","browser":"dist/index.js","scripts":{"docs":"npx jsdoc -c .jsdocrc.json .","test":"echo \"Error: no test specified\" && exit 1","build":"cross-env NODE_ENV=production aofl build","build-ci":"cross-env NODE_ENV=production aofl build --debug","build:dev":"cross-env NODE_ENV=development aofl build","prepublishOnly":"npm run build-ci && npm run docs"},"typings":"types.d.ts","_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"6.14.11","description":"A module for simplifying api calls","directories":{},"_nodeVersion":"12.20.1","_hasShrinkwrap":false,"devDependencies":{"jsdoc":"^3.6.3","@aofl/cli":"^3.13.1","cross-env":"^6.0.3","tsd-jsdoc":"^2.4.0","@aofl/cache-manager":"^3.13.1"},"peerDependencies":{"@aofl/cache-manager":">= 3.0.0-beta.1 < 4.0.0"},"_npmOperationalInternal":{"tmp":"tmp/api-request_3.13.1_1623800926275_0.5450169230189745","host":"s3://npm-registry-packages"}},"4.0.0-alpha.13":{"name":"@aofl/api-request","version":"4.0.0-alpha.13","keywords":["aofljs","@aofl/api-request","api request","api","cache response"],"author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/api-request@4.0.0-alpha.13","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"contributors":[{"name":"Daniel Belisle","email":"daniel.belisle@aofl.com"},{"name":"Micah Blu","email":"micah.blu@aofl.com"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"9b66e65fffd95eb439c0c38edcfa92d2eed0aeaf","tarball":"https://registry.npmjs.org/@aofl/api-request/-/api-request-4.0.0-alpha.13.tgz","fileCount":8,"integrity":"sha512-f3pzTJu7TmRNMimcDBIZyrHI0lPoVIfBv4hgtmOeWfB7BSb2ULW2KlU3D+joJt3KUmJ6WK6ZKWgKmO6OytCxlg==","signatures":[{"sig":"MEYCIQDybfPQvDTcjUX4W/nB505/8C7hybM7xnCkKTF3YSyyRQIhAOZBBXSZlVbhy71E1L9fKmV3BAnTAfZN7DHWJ67ra8Qv","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24812},"main":"index.js","module":"index.js","readme":"# @aofl/api-request\n\nA module for making api calls easier. Key features include caching responses and request/response formatters.\n\nCaching is implemented using @aofl/cache-manager and uses MemoryCache. @aofl/api-request caches the promises created by fetch api.\n\n\nRequest/response formatting refers to constructing a request payload and parsing the response payload. A formatter object should implement `pack()` and `unpack()` properties. `pack()` is to construct the request payload and `unpack()` is used to parse the response. Any number of formatters can be added to `apiRequestInstance` using the `addFromatter()` method. E.g. `GetFormatter`, `PostFormatter`, `CorsFormatter`, `FileUploadFormatter`, `GoogleMapsFormatter`, ....\n\n[Api Documentation](https://ageoflearning.github.io/aofl/v3.x/api-docs/module-@aofl_api-request.html)\n\n## Examples\n* [Basic Example](https://codesandbox.io/s/github/AgeOfLearning/aofl/tree/v3.0.0/aofl-js-packages/api-request/examples/simple)\n\n## Installation\n```bash\nnpm i -S @aofl/api-request\n```\n\n## Usage\n```javascript\nimport {ApiRequest} from '@aofl/api-request';\n\nclass PostFormatter {\n  static pack(payload) {\n    const headers = new Headers();\n    const body = new FormData();\n\n    if (typeof payload !== 'undefined') {\n      body.append('arguments', JSON.stringify(payload));\n    }\n\n    return {\n      method: 'POST',\n      headers,\n      body,\n      mode: 'cors',\n      credentials: 'include'\n    };\n  }\n\n  static unpack(response) {\n    return response.json()\n    .then((data) => {\n      if (data.status !== 'success') {\n        return Promise.reject(data);\n      }\n      return data;\n    });\n  }\n}\n\nconst apiRequestInstance = new ApiRequest();\napiRequestInstance.addFormatter('post', PostFormatter);\n\napiRequestInstance.request('https://example.org/', {}, 'post', true, 'sample-namespace')\n.then((jsonResponse) => {\n})\n.catch((jsonResponse) => {\n});\n```\n","browser":"dist/index.js","scripts":{"docs":"npx jsdoc -c .jsdocrc.json .","test":"echo \"Error: no test specified\" && exit 1","build":"cross-env NODE_ENV=production aofl build","build-ci":"cross-env NODE_ENV=production aofl build --debug","build:dev":"cross-env NODE_ENV=development aofl build","prepublishOnly":"npm run build-ci && npm run docs"},"typings":"types.d.ts","_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"6.14.15","description":"A module for simplifying api calls","directories":{},"_nodeVersion":"14.17.6","_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jsdoc":"^3.6.6","@aofl/cli":"^4.0.0-alpha.13","cross-env":"^7.0.3","tsd-jsdoc":"^2.5.0","@aofl/cache-manager":"^4.0.0-alpha.13"},"peerDependencies":{"@aofl/cache-manager":"^4.0.0-alpha.9"},"_npmOperationalInternal":{"tmp":"tmp/api-request_4.0.0-alpha.13_1632439929894_0.6994799192084027","host":"s3://npm-registry-packages"}},"4.0.0-alpha.15":{"name":"@aofl/api-request","version":"4.0.0-alpha.15","keywords":["aofljs","@aofl/api-request","api request","api","cache response"],"author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/api-request@4.0.0-alpha.15","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"contributors":[{"name":"Daniel Belisle","email":"daniel.belisle@aofl.com"},{"name":"Micah Blu","email":"micah.blu@aofl.com"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"cfd9f49fc64eb44a844aee2f65d094cf9d150558","tarball":"https://registry.npmjs.org/@aofl/api-request/-/api-request-4.0.0-alpha.15.tgz","fileCount":8,"integrity":"sha512-UNHU+oPz4XoBWnalz/GcShFg3y2GJ3svFnoWgTsqDR10mDwbJtlXITfY85sBp0HZWEWujVzfKcLs3sRswrNK8g==","signatures":[{"sig":"MEUCIQCfeni8+KEh2cofmCzjPfePu78lg3+DxO42oBTi4gXl3wIgTUS0F9FcQLUPZdqFPmuqLLnez4A0DcZKp2xgCbUFVQw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24523},"main":"index.js","module":"index.js","readme":"# @aofl/api-request\n\nA module for making api calls easier. Key features include caching responses and request/response formatters.\n\nCaching is implemented using @aofl/cache-manager and uses MemoryCache. @aofl/api-request caches the promises created by fetch api.\n\n\nRequest/response formatting refers to constructing a request payload and parsing the response payload. A formatter object should implement `pack()` and `unpack()` properties. `pack()` is to construct the request payload and `unpack()` is used to parse the response. Any number of formatters can be added to `apiRequestInstance` using the `addFromatter()` method. E.g. `GetFormatter`, `PostFormatter`, `CorsFormatter`, `FileUploadFormatter`, `GoogleMapsFormatter`, ....\n\n[Api Documentation](https://ageoflearning.github.io/aofl/v3.x/api-docs/module-@aofl_api-request.html)\n\n## Examples\n* [Basic Example](https://codesandbox.io/s/github/AgeOfLearning/aofl/tree/v3.0.0/aofl-js-packages/api-request/examples/simple)\n\n## Installation\n```bash\nnpm i -S @aofl/api-request\n```\n\n## Usage\n```javascript\nimport {ApiRequest} from '@aofl/api-request';\n\nclass PostFormatter {\n  static pack(payload) {\n    const headers = new Headers();\n    const body = new FormData();\n\n    if (typeof payload !== 'undefined') {\n      body.append('arguments', JSON.stringify(payload));\n    }\n\n    return {\n      method: 'POST',\n      headers,\n      body,\n      mode: 'cors',\n      credentials: 'include'\n    };\n  }\n\n  static unpack(response) {\n    return response.json()\n    .then((data) => {\n      if (data.status !== 'success') {\n        return Promise.reject(data);\n      }\n      return data;\n    });\n  }\n}\n\nconst apiRequestInstance = new ApiRequest();\napiRequestInstance.addFormatter('post', PostFormatter);\n\napiRequestInstance.request('https://example.org/', {}, 'post', true, 'sample-namespace')\n.then((jsonResponse) => {\n})\n.catch((jsonResponse) => {\n});\n```\n","browser":"dist/index.js","gitHead":"7b448cf64b30502883b3422662a9480ea25f2d60","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"typings":"types.d.ts","_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"7.24.2","description":"A module for simplifying api calls","directories":{},"_nodeVersion":"14.17.6","_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jsdoc":"^3.6.6","@aofl/cli":"^4.0.0-alpha.15","cross-env":"^7.0.3","tsd-jsdoc":"^2.5.0","@aofl/cache-manager":"^4.0.0-alpha.15"},"peerDependencies":{"@aofl/cache-manager":"^4.0.0-alpha.9"},"_npmOperationalInternal":{"tmp":"tmp/api-request_4.0.0-alpha.15_1633539833201_0.01981282243431104","host":"s3://npm-registry-packages"}},"4.0.0-alpha.16":{"name":"@aofl/api-request","version":"4.0.0-alpha.16","keywords":["aofljs","@aofl/api-request","api request","api","cache response"],"author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/api-request@4.0.0-alpha.16","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"contributors":[{"name":"Daniel Belisle","email":"daniel.belisle@aofl.com"},{"name":"Micah Blu","email":"micah.blu@aofl.com"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"2fdfb868391c476d8271bd1f0b6a6b927360df81","tarball":"https://registry.npmjs.org/@aofl/api-request/-/api-request-4.0.0-alpha.16.tgz","fileCount":8,"integrity":"sha512-HVp3eoqbc1YvACTUExyV5SJwVIOMciX+zBd1StRj51KO+4kps48wLwteM3NGOhUNRfnXQaogFzKDtMAuxuC9TA==","signatures":[{"sig":"MEYCIQC1ztK13l5KzXYw1rc2GlQ5PQeQjZSnPM4Jtp8mEsKkYgIhAPXDOFlyfsNmGJ2GqfM+CAm5tqjKy0BCRPfSxjjezneQ","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24523},"main":"index.js","module":"index.js","readme":"# @aofl/api-request\n\nA module for making api calls easier. Key features include caching responses and request/response formatters.\n\nCaching is implemented using @aofl/cache-manager and uses MemoryCache. @aofl/api-request caches the promises created by fetch api.\n\n\nRequest/response formatting refers to constructing a request payload and parsing the response payload. A formatter object should implement `pack()` and `unpack()` properties. `pack()` is to construct the request payload and `unpack()` is used to parse the response. Any number of formatters can be added to `apiRequestInstance` using the `addFromatter()` method. E.g. `GetFormatter`, `PostFormatter`, `CorsFormatter`, `FileUploadFormatter`, `GoogleMapsFormatter`, ....\n\n[Api Documentation](https://ageoflearning.github.io/aofl/v3.x/api-docs/module-@aofl_api-request.html)\n\n## Examples\n* [Basic Example](https://codesandbox.io/s/github/AgeOfLearning/aofl/tree/v3.0.0/aofl-js-packages/api-request/examples/simple)\n\n## Installation\n```bash\nnpm i -S @aofl/api-request\n```\n\n## Usage\n```javascript\nimport {ApiRequest} from '@aofl/api-request';\n\nclass PostFormatter {\n  static pack(payload) {\n    const headers = new Headers();\n    const body = new FormData();\n\n    if (typeof payload !== 'undefined') {\n      body.append('arguments', JSON.stringify(payload));\n    }\n\n    return {\n      method: 'POST',\n      headers,\n      body,\n      mode: 'cors',\n      credentials: 'include'\n    };\n  }\n\n  static unpack(response) {\n    return response.json()\n    .then((data) => {\n      if (data.status !== 'success') {\n        return Promise.reject(data);\n      }\n      return data;\n    });\n  }\n}\n\nconst apiRequestInstance = new ApiRequest();\napiRequestInstance.addFormatter('post', PostFormatter);\n\napiRequestInstance.request('https://example.org/', {}, 'post', true, 'sample-namespace')\n.then((jsonResponse) => {\n})\n.catch((jsonResponse) => {\n});\n```\n","browser":"dist/index.js","gitHead":"7b448cf64b30502883b3422662a9480ea25f2d60","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"typings":"types.d.ts","_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"7.24.2","description":"A module for simplifying api calls","directories":{},"_nodeVersion":"14.17.6","_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jsdoc":"^3.6.6","@aofl/cli":"^4.0.0-alpha.16","cross-env":"^7.0.3","tsd-jsdoc":"^2.5.0","@aofl/cache-manager":"^4.0.0-alpha.16"},"peerDependencies":{"@aofl/cache-manager":"^4.0.0-alpha.9"},"_npmOperationalInternal":{"tmp":"tmp/api-request_4.0.0-alpha.16_1633539908422_0.7653553545484746","host":"s3://npm-registry-packages"}},"4.0.0-alpha.17":{"name":"@aofl/api-request","version":"4.0.0-alpha.17","keywords":["aofljs","@aofl/api-request","api request","api","cache response"],"author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/api-request@4.0.0-alpha.17","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"contributors":[{"name":"Daniel Belisle","email":"daniel.belisle@aofl.com"},{"name":"Micah Blu","email":"micah.blu@aofl.com"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"9bc878a095ab3a794edea7266704d33bfae60172","tarball":"https://registry.npmjs.org/@aofl/api-request/-/api-request-4.0.0-alpha.17.tgz","fileCount":8,"integrity":"sha512-xSKa0EdkV9Iew8jNZfd7x6DONdl1fp5UB0MmZISR3qaJq8+DiJU8qzs01mVa/KyecFVsU5X4mjfO357LsviyhQ==","signatures":[{"sig":"MEQCIEXqtnKnCf6mpQVKKrai4ivS+rcoBTDJf2F3pycYbWPIAiAUqaS1eCuiY9oJen+9wVA2fhewPYm0zM8tl5wKDnKV+A==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24523},"main":"index.js","module":"index.js","readme":"# @aofl/api-request\n\nA module for making api calls easier. Key features include caching responses and request/response formatters.\n\nCaching is implemented using @aofl/cache-manager and uses MemoryCache. @aofl/api-request caches the promises created by fetch api.\n\n\nRequest/response formatting refers to constructing a request payload and parsing the response payload. A formatter object should implement `pack()` and `unpack()` properties. `pack()` is to construct the request payload and `unpack()` is used to parse the response. Any number of formatters can be added to `apiRequestInstance` using the `addFromatter()` method. E.g. `GetFormatter`, `PostFormatter`, `CorsFormatter`, `FileUploadFormatter`, `GoogleMapsFormatter`, ....\n\n[Api Documentation](https://ageoflearning.github.io/aofl/v3.x/api-docs/module-@aofl_api-request.html)\n\n## Examples\n* [Basic Example](https://codesandbox.io/s/github/AgeOfLearning/aofl/tree/v3.0.0/aofl-js-packages/api-request/examples/simple)\n\n## Installation\n```bash\nnpm i -S @aofl/api-request\n```\n\n## Usage\n```javascript\nimport {ApiRequest} from '@aofl/api-request';\n\nclass PostFormatter {\n  static pack(payload) {\n    const headers = new Headers();\n    const body = new FormData();\n\n    if (typeof payload !== 'undefined') {\n      body.append('arguments', JSON.stringify(payload));\n    }\n\n    return {\n      method: 'POST',\n      headers,\n      body,\n      mode: 'cors',\n      credentials: 'include'\n    };\n  }\n\n  static unpack(response) {\n    return response.json()\n    .then((data) => {\n      if (data.status !== 'success') {\n        return Promise.reject(data);\n      }\n      return data;\n    });\n  }\n}\n\nconst apiRequestInstance = new ApiRequest();\napiRequestInstance.addFormatter('post', PostFormatter);\n\napiRequestInstance.request('https://example.org/', {}, 'post', true, 'sample-namespace')\n.then((jsonResponse) => {\n})\n.catch((jsonResponse) => {\n});\n```\n","browser":"dist/index.js","gitHead":"c7b3ad6feb17eaf3721a5528e86a31ddfb350ef3","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"typings":"types.d.ts","_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"7.24.2","description":"A module for simplifying api calls","directories":{},"_nodeVersion":"14.17.6","_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jsdoc":"^3.6.6","@aofl/cli":"^4.0.0-alpha.17","cross-env":"^7.0.3","tsd-jsdoc":"^2.5.0","@aofl/cache-manager":"^4.0.0-alpha.17"},"peerDependencies":{"@aofl/cache-manager":"^4.0.0-alpha.9"},"_npmOperationalInternal":{"tmp":"tmp/api-request_4.0.0-alpha.17_1633546051306_0.26262941934197603","host":"s3://npm-registry-packages"}},"4.0.0-alpha.18":{"name":"@aofl/api-request","version":"4.0.0-alpha.18","keywords":["aofljs","@aofl/api-request","api request","api","cache response"],"author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/api-request@4.0.0-alpha.18","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"contributors":[{"name":"Daniel Belisle","email":"daniel.belisle@aofl.com"},{"name":"Micah Blu","email":"micah.blu@aofl.com"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"142f4e0a5addb659d811a28fbcfe156d24c87a88","tarball":"https://registry.npmjs.org/@aofl/api-request/-/api-request-4.0.0-alpha.18.tgz","fileCount":8,"integrity":"sha512-jaTpD7lncbbl7zQq30wFhKL70IHAoadyifXRMDIG/6Y6PxOfS0AeJl/UOguUJZwSzzOSin8PAucsQFHiQIdvWA==","signatures":[{"sig":"MEYCIQDQsOnMtvIbcUvvQyoCzn3ZHEpn5J3GNLiHHe/4/+Ub4gIhAKq4IuqoRZO/xFE1xHLCAFF1vRLRjz03PN+QiH1EKBV2","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24523},"main":"index.js","module":"index.js","readme":"# @aofl/api-request\n\nA module for making api calls easier. Key features include caching responses and request/response formatters.\n\nCaching is implemented using @aofl/cache-manager and uses MemoryCache. @aofl/api-request caches the promises created by fetch api.\n\n\nRequest/response formatting refers to constructing a request payload and parsing the response payload. A formatter object should implement `pack()` and `unpack()` properties. `pack()` is to construct the request payload and `unpack()` is used to parse the response. Any number of formatters can be added to `apiRequestInstance` using the `addFromatter()` method. E.g. `GetFormatter`, `PostFormatter`, `CorsFormatter`, `FileUploadFormatter`, `GoogleMapsFormatter`, ....\n\n[Api Documentation](https://ageoflearning.github.io/aofl/v3.x/api-docs/module-@aofl_api-request.html)\n\n## Examples\n* [Basic Example](https://codesandbox.io/s/github/AgeOfLearning/aofl/tree/v3.0.0/aofl-js-packages/api-request/examples/simple)\n\n## Installation\n```bash\nnpm i -S @aofl/api-request\n```\n\n## Usage\n```javascript\nimport {ApiRequest} from '@aofl/api-request';\n\nclass PostFormatter {\n  static pack(payload) {\n    const headers = new Headers();\n    const body = new FormData();\n\n    if (typeof payload !== 'undefined') {\n      body.append('arguments', JSON.stringify(payload));\n    }\n\n    return {\n      method: 'POST',\n      headers,\n      body,\n      mode: 'cors',\n      credentials: 'include'\n    };\n  }\n\n  static unpack(response) {\n    return response.json()\n    .then((data) => {\n      if (data.status !== 'success') {\n        return Promise.reject(data);\n      }\n      return data;\n    });\n  }\n}\n\nconst apiRequestInstance = new ApiRequest();\napiRequestInstance.addFormatter('post', PostFormatter);\n\napiRequestInstance.request('https://example.org/', {}, 'post', true, 'sample-namespace')\n.then((jsonResponse) => {\n})\n.catch((jsonResponse) => {\n});\n```\n","browser":"dist/index.js","gitHead":"3971875a8be8fc1e4ed7f6c737cc9aa1653e049b","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"typings":"types.d.ts","_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"7.24.2","description":"A module for simplifying api calls","directories":{},"_nodeVersion":"14.17.6","_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jsdoc":"^3.6.6","@aofl/cli":"^4.0.0-alpha.18","cross-env":"^7.0.3","tsd-jsdoc":"^2.5.0","@aofl/cache-manager":"^4.0.0-alpha.18"},"peerDependencies":{"@aofl/cache-manager":"^4.0.0-alpha.9"},"_npmOperationalInternal":{"tmp":"tmp/api-request_4.0.0-alpha.18_1633563633380_0.2242662634099717","host":"s3://npm-registry-packages"}},"4.0.0-alpha.19":{"name":"@aofl/api-request","version":"4.0.0-alpha.19","keywords":["aofljs","@aofl/api-request","api request","api","cache response"],"author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/api-request@4.0.0-alpha.19","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"contributors":[{"name":"Daniel Belisle","email":"daniel.belisle@aofl.com"},{"name":"Micah Blu","email":"micah.blu@aofl.com"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"d52625f0134ded23665b14c4154dd3a6884f9312","tarball":"https://registry.npmjs.org/@aofl/api-request/-/api-request-4.0.0-alpha.19.tgz","fileCount":8,"integrity":"sha512-KB9F62341vZ6yH76DGXY9yw5No+P6wsuVjyrm80juXvFby1ac1cOLUqC0+3m6Ku0GK/QYVUuFVo/rHhyysNZ3Q==","signatures":[{"sig":"MEUCIQDhhe5C9iHiMKoX96AwznWc1WNtpD6olyT5lxS+MQe7rQIgcgY7pkNdTOnJaSbBN7rnv3XIhATkfIrdpbMa1NtlhDw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24523},"main":"index.js","module":"index.js","readme":"# @aofl/api-request\n\nA module for making api calls easier. Key features include caching responses and request/response formatters.\n\nCaching is implemented using @aofl/cache-manager and uses MemoryCache. @aofl/api-request caches the promises created by fetch api.\n\n\nRequest/response formatting refers to constructing a request payload and parsing the response payload. A formatter object should implement `pack()` and `unpack()` properties. `pack()` is to construct the request payload and `unpack()` is used to parse the response. Any number of formatters can be added to `apiRequestInstance` using the `addFromatter()` method. E.g. `GetFormatter`, `PostFormatter`, `CorsFormatter`, `FileUploadFormatter`, `GoogleMapsFormatter`, ....\n\n[Api Documentation](https://ageoflearning.github.io/aofl/v3.x/api-docs/module-@aofl_api-request.html)\n\n## Examples\n* [Basic Example](https://codesandbox.io/s/github/AgeOfLearning/aofl/tree/v3.0.0/aofl-js-packages/api-request/examples/simple)\n\n## Installation\n```bash\nnpm i -S @aofl/api-request\n```\n\n## Usage\n```javascript\nimport {ApiRequest} from '@aofl/api-request';\n\nclass PostFormatter {\n  static pack(payload) {\n    const headers = new Headers();\n    const body = new FormData();\n\n    if (typeof payload !== 'undefined') {\n      body.append('arguments', JSON.stringify(payload));\n    }\n\n    return {\n      method: 'POST',\n      headers,\n      body,\n      mode: 'cors',\n      credentials: 'include'\n    };\n  }\n\n  static unpack(response) {\n    return response.json()\n    .then((data) => {\n      if (data.status !== 'success') {\n        return Promise.reject(data);\n      }\n      return data;\n    });\n  }\n}\n\nconst apiRequestInstance = new ApiRequest();\napiRequestInstance.addFormatter('post', PostFormatter);\n\napiRequestInstance.request('https://example.org/', {}, 'post', true, 'sample-namespace')\n.then((jsonResponse) => {\n})\n.catch((jsonResponse) => {\n});\n```\n","browser":"dist/index.js","gitHead":"79369e766cd4fe78098059b93d1cbd7bb5dd8830","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"typings":"types.d.ts","_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"7.24.2","description":"A module for simplifying api calls","directories":{},"_nodeVersion":"14.17.6","_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jsdoc":"^3.6.6","@aofl/cli":"^4.0.0-alpha.19","cross-env":"^7.0.3","tsd-jsdoc":"^2.5.0","@aofl/cache-manager":"^4.0.0-alpha.19"},"peerDependencies":{"@aofl/cache-manager":"^4.0.0-alpha.9"},"_npmOperationalInternal":{"tmp":"tmp/api-request_4.0.0-alpha.19_1633564049217_0.24279880463086267","host":"s3://npm-registry-packages"}},"4.0.0-alpha.20":{"name":"@aofl/api-request","version":"4.0.0-alpha.20","keywords":["aofljs","@aofl/api-request","api request","api","cache response"],"author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/api-request@4.0.0-alpha.20","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"contributors":[{"name":"Daniel Belisle","email":"daniel.belisle@aofl.com"},{"name":"Micah Blu","email":"micah.blu@aofl.com"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"2d5b43a1ab55dd36477b89f74a098af5735b9c27","tarball":"https://registry.npmjs.org/@aofl/api-request/-/api-request-4.0.0-alpha.20.tgz","fileCount":8,"integrity":"sha512-Rk10UrSJ1xi4CW7cqVrKkJySvFU6cVOfqXGUhAWMyhZiX8marVaCC1Wr7sCvIVxtCJyD05uImE/22ZTHZyCkyg==","signatures":[{"sig":"MEUCIC45EKEuAIu0R3f7VFMDfy+Yh5Oma+ezy1dJrr+BTib+AiEAgsDzPKFO3EE+eGjLJpUQRYr2kBhaByjLhhwgjgo1fqg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24523},"main":"index.js","module":"index.js","readme":"# @aofl/api-request\n\nA module for making api calls easier. Key features include caching responses and request/response formatters.\n\nCaching is implemented using @aofl/cache-manager and uses MemoryCache. @aofl/api-request caches the promises created by fetch api.\n\n\nRequest/response formatting refers to constructing a request payload and parsing the response payload. A formatter object should implement `pack()` and `unpack()` properties. `pack()` is to construct the request payload and `unpack()` is used to parse the response. Any number of formatters can be added to `apiRequestInstance` using the `addFromatter()` method. E.g. `GetFormatter`, `PostFormatter`, `CorsFormatter`, `FileUploadFormatter`, `GoogleMapsFormatter`, ....\n\n[Api Documentation](https://ageoflearning.github.io/aofl/v3.x/api-docs/module-@aofl_api-request.html)\n\n## Examples\n* [Basic Example](https://codesandbox.io/s/github/AgeOfLearning/aofl/tree/v3.0.0/aofl-js-packages/api-request/examples/simple)\n\n## Installation\n```bash\nnpm i -S @aofl/api-request\n```\n\n## Usage\n```javascript\nimport {ApiRequest} from '@aofl/api-request';\n\nclass PostFormatter {\n  static pack(payload) {\n    const headers = new Headers();\n    const body = new FormData();\n\n    if (typeof payload !== 'undefined') {\n      body.append('arguments', JSON.stringify(payload));\n    }\n\n    return {\n      method: 'POST',\n      headers,\n      body,\n      mode: 'cors',\n      credentials: 'include'\n    };\n  }\n\n  static unpack(response) {\n    return response.json()\n    .then((data) => {\n      if (data.status !== 'success') {\n        return Promise.reject(data);\n      }\n      return data;\n    });\n  }\n}\n\nconst apiRequestInstance = new ApiRequest();\napiRequestInstance.addFormatter('post', PostFormatter);\n\napiRequestInstance.request('https://example.org/', {}, 'post', true, 'sample-namespace')\n.then((jsonResponse) => {\n})\n.catch((jsonResponse) => {\n});\n```\n","browser":"dist/index.js","gitHead":"398f195bda4d61023d6d7889598f5688c276f1bf","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"typings":"types.d.ts","_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"7.24.2","description":"A module for simplifying api calls","directories":{},"_nodeVersion":"14.17.6","_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jsdoc":"^3.6.6","@aofl/cli":"^4.0.0-alpha.20","cross-env":"^7.0.3","tsd-jsdoc":"^2.5.0","@aofl/cache-manager":"^4.0.0-alpha.20"},"peerDependencies":{"@aofl/cache-manager":"^4.0.0-alpha.9"},"_npmOperationalInternal":{"tmp":"tmp/api-request_4.0.0-alpha.20_1633564496676_0.9386216368701579","host":"s3://npm-registry-packages"}},"4.0.0-alpha.21":{"name":"@aofl/api-request","version":"4.0.0-alpha.21","keywords":["aofljs","@aofl/api-request","api request","api","cache response"],"author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/api-request@4.0.0-alpha.21","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"contributors":[{"name":"Daniel Belisle","email":"daniel.belisle@aofl.com"},{"name":"Micah Blu","email":"micah.blu@aofl.com"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"cb457482b4226c53192e5fd7de46b001bce5a49d","tarball":"https://registry.npmjs.org/@aofl/api-request/-/api-request-4.0.0-alpha.21.tgz","fileCount":8,"integrity":"sha512-FJJS240GaBoAGfqa2IHxIPWfz/u4LcupRgPTdKu5dskGLc1zzd/vgbCvjXwqHGMi7zZ/IUl2j4ms5g4RT8c7dw==","signatures":[{"sig":"MEQCIG8Gub36kjIiPkV0eq1SePOV3Lh4wXWoHieEkPKafFLDAiAUpxffc+/BKMj2p091J/VQol9NfC1jiiAiPjCWG3hl1g==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24523},"main":"index.js","module":"index.js","readme":"# @aofl/api-request\n\nA module for making api calls easier. Key features include caching responses and request/response formatters.\n\nCaching is implemented using @aofl/cache-manager and uses MemoryCache. @aofl/api-request caches the promises created by fetch api.\n\n\nRequest/response formatting refers to constructing a request payload and parsing the response payload. A formatter object should implement `pack()` and `unpack()` properties. `pack()` is to construct the request payload and `unpack()` is used to parse the response. Any number of formatters can be added to `apiRequestInstance` using the `addFromatter()` method. E.g. `GetFormatter`, `PostFormatter`, `CorsFormatter`, `FileUploadFormatter`, `GoogleMapsFormatter`, ....\n\n[Api Documentation](https://ageoflearning.github.io/aofl/v3.x/api-docs/module-@aofl_api-request.html)\n\n## Examples\n* [Basic Example](https://codesandbox.io/s/github/AgeOfLearning/aofl/tree/v3.0.0/aofl-js-packages/api-request/examples/simple)\n\n## Installation\n```bash\nnpm i -S @aofl/api-request\n```\n\n## Usage\n```javascript\nimport {ApiRequest} from '@aofl/api-request';\n\nclass PostFormatter {\n  static pack(payload) {\n    const headers = new Headers();\n    const body = new FormData();\n\n    if (typeof payload !== 'undefined') {\n      body.append('arguments', JSON.stringify(payload));\n    }\n\n    return {\n      method: 'POST',\n      headers,\n      body,\n      mode: 'cors',\n      credentials: 'include'\n    };\n  }\n\n  static unpack(response) {\n    return response.json()\n    .then((data) => {\n      if (data.status !== 'success') {\n        return Promise.reject(data);\n      }\n      return data;\n    });\n  }\n}\n\nconst apiRequestInstance = new ApiRequest();\napiRequestInstance.addFormatter('post', PostFormatter);\n\napiRequestInstance.request('https://example.org/', {}, 'post', true, 'sample-namespace')\n.then((jsonResponse) => {\n})\n.catch((jsonResponse) => {\n});\n```\n","browser":"dist/index.js","gitHead":"398f195bda4d61023d6d7889598f5688c276f1bf","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"typings":"types.d.ts","_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"7.24.2","description":"A module for simplifying api calls","directories":{},"_nodeVersion":"14.17.6","_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jsdoc":"^3.6.6","@aofl/cli":"^4.0.0-alpha.21","cross-env":"^7.0.3","tsd-jsdoc":"^2.5.0","@aofl/cache-manager":"^4.0.0-alpha.21"},"peerDependencies":{"@aofl/cache-manager":"^4.0.0-alpha.9"},"_npmOperationalInternal":{"tmp":"tmp/api-request_4.0.0-alpha.21_1633712760340_0.9234395027055129","host":"s3://npm-registry-packages"}},"4.0.0-alpha.22":{"name":"@aofl/api-request","version":"4.0.0-alpha.22","keywords":["aofljs","@aofl/api-request","api request","api","cache response"],"author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/api-request@4.0.0-alpha.22","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"contributors":[{"name":"Daniel Belisle","email":"daniel.belisle@aofl.com"},{"name":"Micah Blu","email":"micah.blu@aofl.com"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"3c5d0d27326934b9510dc08025a72fc421ce00bd","tarball":"https://registry.npmjs.org/@aofl/api-request/-/api-request-4.0.0-alpha.22.tgz","fileCount":8,"integrity":"sha512-ODfhzqmOjVSPDtzST3kwaNomI2b5CpPrzO68JrYdupeTe5cAYZNz7J/8Cqo5A07me4cXlyOGkciJqhVWQFDb7w==","signatures":[{"sig":"MEUCIF31O2NW31XAiaHMSKeN+mJWixd7W1xwS6n8IuIJNF29AiEA6JmonWMhR6L1AlsVBNfz53z369ysuOvQtpKlNCWrCwE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24487},"main":"index.js","module":"index.js","readme":"# @aofl/api-request\n\nA module for making api calls easier. Key features include caching responses and request/response formatters.\n\nCaching is implemented using @aofl/cache-manager and uses MemoryCache. @aofl/api-request caches the promises created by fetch api.\n\n\nRequest/response formatting refers to constructing a request payload and parsing the response payload. A formatter object should implement `pack()` and `unpack()` properties. `pack()` is to construct the request payload and `unpack()` is used to parse the response. Any number of formatters can be added to `apiRequestInstance` using the `addFromatter()` method. E.g. `GetFormatter`, `PostFormatter`, `CorsFormatter`, `FileUploadFormatter`, `GoogleMapsFormatter`, ....\n\n[Api Documentation](https://ageoflearning.github.io/aofl/v3.x/api-docs/module-@aofl_api-request.html)\n\n## Examples\n* [Basic Example](https://codesandbox.io/s/github/AgeOfLearning/aofl/tree/v3.0.0/aofl-js-packages/api-request/examples/simple)\n\n## Installation\n```bash\nnpm i -S @aofl/api-request\n```\n\n## Usage\n```javascript\nimport {ApiRequest} from '@aofl/api-request';\n\nclass PostFormatter {\n  static pack(payload) {\n    const headers = new Headers();\n    const body = new FormData();\n\n    if (typeof payload !== 'undefined') {\n      body.append('arguments', JSON.stringify(payload));\n    }\n\n    return {\n      method: 'POST',\n      headers,\n      body,\n      mode: 'cors',\n      credentials: 'include'\n    };\n  }\n\n  static unpack(response) {\n    return response.json()\n    .then((data) => {\n      if (data.status !== 'success') {\n        return Promise.reject(data);\n      }\n      return data;\n    });\n  }\n}\n\nconst apiRequestInstance = new ApiRequest();\napiRequestInstance.addFormatter('post', PostFormatter);\n\napiRequestInstance.request('https://example.org/', {}, 'post', true, 'sample-namespace')\n.then((jsonResponse) => {\n})\n.catch((jsonResponse) => {\n});\n```\n","browser":"dist/index.js","gitHead":"289b7f60d1cd721d68cff783afc623c3f51cc2cf","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"typings":"types.d.ts","_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"7.24.2","description":"A module for simplifying api calls","directories":{},"_nodeVersion":"14.17.6","_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jsdoc":"^3.6.6","cross-env":"^7.0.3","tsd-jsdoc":"^2.5.0","@aofl/cache-manager":"^4.0.0-alpha.22"},"peerDependencies":{"@aofl/cache-manager":"^4.0.0-alpha.9"},"_npmOperationalInternal":{"tmp":"tmp/api-request_4.0.0-alpha.22_1633984764864_0.6726662379116823","host":"s3://npm-registry-packages"}},"4.0.0-alpha.23":{"name":"@aofl/api-request","version":"4.0.0-alpha.23","keywords":["aofljs","@aofl/api-request","api request","api","cache response"],"author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/api-request@4.0.0-alpha.23","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"contributors":[{"name":"Daniel Belisle","email":"daniel.belisle@aofl.com"},{"name":"Micah Blu","email":"micah.blu@aofl.com"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"55f4065c24091be452e95834e5de15c7605620cc","tarball":"https://registry.npmjs.org/@aofl/api-request/-/api-request-4.0.0-alpha.23.tgz","fileCount":8,"integrity":"sha512-dbTUxhnD1ApkgIxLI5Li/kNknPJ8O46weWlfHHyg9mpqVr7q65pqPV36vvYjaCZajecReoIFyPdK2uIGJ5t6FQ==","signatures":[{"sig":"MEQCIBCRKgoyqXtJ2/E9HyK5FSdi/0BJBlfQFxmY8i0H5gRpAiBw5f/B1Zr4ngHdlYgTwGPrNsGc6Fkq6M/Od0agEZhGzw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24487},"main":"index.js","module":"index.js","readme":"# @aofl/api-request\n\nA module for making api calls easier. Key features include caching responses and request/response formatters.\n\nCaching is implemented using @aofl/cache-manager and uses MemoryCache. @aofl/api-request caches the promises created by fetch api.\n\n\nRequest/response formatting refers to constructing a request payload and parsing the response payload. A formatter object should implement `pack()` and `unpack()` properties. `pack()` is to construct the request payload and `unpack()` is used to parse the response. Any number of formatters can be added to `apiRequestInstance` using the `addFromatter()` method. E.g. `GetFormatter`, `PostFormatter`, `CorsFormatter`, `FileUploadFormatter`, `GoogleMapsFormatter`, ....\n\n[Api Documentation](https://ageoflearning.github.io/aofl/v3.x/api-docs/module-@aofl_api-request.html)\n\n## Examples\n* [Basic Example](https://codesandbox.io/s/github/AgeOfLearning/aofl/tree/v3.0.0/aofl-js-packages/api-request/examples/simple)\n\n## Installation\n```bash\nnpm i -S @aofl/api-request\n```\n\n## Usage\n```javascript\nimport {ApiRequest} from '@aofl/api-request';\n\nclass PostFormatter {\n  static pack(payload) {\n    const headers = new Headers();\n    const body = new FormData();\n\n    if (typeof payload !== 'undefined') {\n      body.append('arguments', JSON.stringify(payload));\n    }\n\n    return {\n      method: 'POST',\n      headers,\n      body,\n      mode: 'cors',\n      credentials: 'include'\n    };\n  }\n\n  static unpack(response) {\n    return response.json()\n    .then((data) => {\n      if (data.status !== 'success') {\n        return Promise.reject(data);\n      }\n      return data;\n    });\n  }\n}\n\nconst apiRequestInstance = new ApiRequest();\napiRequestInstance.addFormatter('post', PostFormatter);\n\napiRequestInstance.request('https://example.org/', {}, 'post', true, 'sample-namespace')\n.then((jsonResponse) => {\n})\n.catch((jsonResponse) => {\n});\n```\n","browser":"dist/index.js","gitHead":"a2829d023883e5cc51126ee549f70629ceae8e8d","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"typings":"types.d.ts","_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"7.24.2","description":"A module for simplifying api calls","directories":{},"_nodeVersion":"14.17.6","_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jsdoc":"^3.6.6","cross-env":"^7.0.3","tsd-jsdoc":"^2.5.0","@aofl/cache-manager":"^4.0.0-alpha.23"},"peerDependencies":{"@aofl/cache-manager":"^4.0.0-alpha.9"},"_npmOperationalInternal":{"tmp":"tmp/api-request_4.0.0-alpha.23_1633986442127_0.7510138824527801","host":"s3://npm-registry-packages"}},"4.0.0-alpha.24":{"name":"@aofl/api-request","version":"4.0.0-alpha.24","keywords":["aofljs","@aofl/api-request","api request","api","cache response"],"author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/api-request@4.0.0-alpha.24","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"contributors":[{"name":"Daniel Belisle","email":"daniel.belisle@aofl.com"},{"name":"Micah Blu","email":"micah.blu@aofl.com"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"b7c319250f2939bfd7e429f33a622bf743b5c48c","tarball":"https://registry.npmjs.org/@aofl/api-request/-/api-request-4.0.0-alpha.24.tgz","fileCount":8,"integrity":"sha512-Oinpi23yWi5Dta6h2UeHnASmZakFCWMB/Z3mYoucQ+N7+KA+A4ofzeAj92INY0gw8rKqRUhJA/XpUN76la4pxA==","signatures":[{"sig":"MEYCIQDPW6heSeusjVIDedty9Gv3g67hsFtYNkqNe+83ajNCVAIhANQ9Z2LRAnnNYTm9dsl7JeXS/jaHMalN9958d1Fl5rhU","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24487},"main":"index.js","module":"index.js","readme":"# @aofl/api-request\n\nA module for making api calls easier. Key features include caching responses and request/response formatters.\n\nCaching is implemented using @aofl/cache-manager and uses MemoryCache. @aofl/api-request caches the promises created by fetch api.\n\n\nRequest/response formatting refers to constructing a request payload and parsing the response payload. A formatter object should implement `pack()` and `unpack()` properties. `pack()` is to construct the request payload and `unpack()` is used to parse the response. Any number of formatters can be added to `apiRequestInstance` using the `addFromatter()` method. E.g. `GetFormatter`, `PostFormatter`, `CorsFormatter`, `FileUploadFormatter`, `GoogleMapsFormatter`, ....\n\n[Api Documentation](https://ageoflearning.github.io/aofl/v3.x/api-docs/module-@aofl_api-request.html)\n\n## Examples\n* [Basic Example](https://codesandbox.io/s/github/AgeOfLearning/aofl/tree/v3.0.0/aofl-js-packages/api-request/examples/simple)\n\n## Installation\n```bash\nnpm i -S @aofl/api-request\n```\n\n## Usage\n```javascript\nimport {ApiRequest} from '@aofl/api-request';\n\nclass PostFormatter {\n  static pack(payload) {\n    const headers = new Headers();\n    const body = new FormData();\n\n    if (typeof payload !== 'undefined') {\n      body.append('arguments', JSON.stringify(payload));\n    }\n\n    return {\n      method: 'POST',\n      headers,\n      body,\n      mode: 'cors',\n      credentials: 'include'\n    };\n  }\n\n  static unpack(response) {\n    return response.json()\n    .then((data) => {\n      if (data.status !== 'success') {\n        return Promise.reject(data);\n      }\n      return data;\n    });\n  }\n}\n\nconst apiRequestInstance = new ApiRequest();\napiRequestInstance.addFormatter('post', PostFormatter);\n\napiRequestInstance.request('https://example.org/', {}, 'post', true, 'sample-namespace')\n.then((jsonResponse) => {\n})\n.catch((jsonResponse) => {\n});\n```\n","browser":"dist/index.js","gitHead":"a2829d023883e5cc51126ee549f70629ceae8e8d","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"typings":"types.d.ts","_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"7.24.2","description":"A module for simplifying api calls","directories":{},"_nodeVersion":"14.17.6","_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jsdoc":"^3.6.6","cross-env":"^7.0.3","tsd-jsdoc":"^2.5.0","@aofl/cache-manager":"^4.0.0-alpha.24"},"peerDependencies":{"@aofl/cache-manager":"^4.0.0-alpha.9"},"_npmOperationalInternal":{"tmp":"tmp/api-request_4.0.0-alpha.24_1633988813882_0.41228199229473694","host":"s3://npm-registry-packages"}},"4.0.0-alpha.25":{"name":"@aofl/api-request","version":"4.0.0-alpha.25","keywords":["aofljs","@aofl/api-request","api request","api","cache response"],"author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/api-request@4.0.0-alpha.25","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"contributors":[{"name":"Daniel Belisle","email":"daniel.belisle@aofl.com"},{"name":"Micah Blu","email":"micah.blu@aofl.com"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"3b90365eb9c0125bc7eb40722c967f3808c8b520","tarball":"https://registry.npmjs.org/@aofl/api-request/-/api-request-4.0.0-alpha.25.tgz","fileCount":8,"integrity":"sha512-g4/vRnntBr/Mg9eajTHcZSwa2EcyJ0CqZJiMzAijZP4LgCvpJhnpkrYZcEbsBYBGEy9kN+IPFnFU5+UEmqELkQ==","signatures":[{"sig":"MEQCICQvMrQWDfifoNjJByBR334ftg+CYO6p6EME375t2F+bAiAJmSzHp71XIxlqXCUtALsH/iMEaQXK3C5fZLoJjaOeoA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24487},"main":"index.js","module":"index.js","readme":"# @aofl/api-request\n\nA module for making api calls easier. Key features include caching responses and request/response formatters.\n\nCaching is implemented using @aofl/cache-manager and uses MemoryCache. @aofl/api-request caches the promises created by fetch api.\n\n\nRequest/response formatting refers to constructing a request payload and parsing the response payload. A formatter object should implement `pack()` and `unpack()` properties. `pack()` is to construct the request payload and `unpack()` is used to parse the response. Any number of formatters can be added to `apiRequestInstance` using the `addFromatter()` method. E.g. `GetFormatter`, `PostFormatter`, `CorsFormatter`, `FileUploadFormatter`, `GoogleMapsFormatter`, ....\n\n[Api Documentation](https://ageoflearning.github.io/aofl/v3.x/api-docs/module-@aofl_api-request.html)\n\n## Examples\n* [Basic Example](https://codesandbox.io/s/github/AgeOfLearning/aofl/tree/v3.0.0/aofl-js-packages/api-request/examples/simple)\n\n## Installation\n```bash\nnpm i -S @aofl/api-request\n```\n\n## Usage\n```javascript\nimport {ApiRequest} from '@aofl/api-request';\n\nclass PostFormatter {\n  static pack(payload) {\n    const headers = new Headers();\n    const body = new FormData();\n\n    if (typeof payload !== 'undefined') {\n      body.append('arguments', JSON.stringify(payload));\n    }\n\n    return {\n      method: 'POST',\n      headers,\n      body,\n      mode: 'cors',\n      credentials: 'include'\n    };\n  }\n\n  static unpack(response) {\n    return response.json()\n    .then((data) => {\n      if (data.status !== 'success') {\n        return Promise.reject(data);\n      }\n      return data;\n    });\n  }\n}\n\nconst apiRequestInstance = new ApiRequest();\napiRequestInstance.addFormatter('post', PostFormatter);\n\napiRequestInstance.request('https://example.org/', {}, 'post', true, 'sample-namespace')\n.then((jsonResponse) => {\n})\n.catch((jsonResponse) => {\n});\n```\n","browser":"dist/index.js","gitHead":"8e4d611be609be11acccb9135091aadd10134e8a","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"typings":"types.d.ts","_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"7.24.2","description":"A module for simplifying api calls","directories":{},"_nodeVersion":"14.17.6","_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jsdoc":"^3.6.6","cross-env":"^7.0.3","tsd-jsdoc":"^2.5.0","@aofl/cache-manager":"^4.0.0-alpha.25"},"peerDependencies":{"@aofl/cache-manager":"^4.0.0-alpha.9"},"_npmOperationalInternal":{"tmp":"tmp/api-request_4.0.0-alpha.25_1634001641968_0.688448126811473","host":"s3://npm-registry-packages"}},"4.0.0-alpha.26":{"name":"@aofl/api-request","version":"4.0.0-alpha.26","keywords":["aofljs","@aofl/api-request","api request","api","cache response"],"author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/api-request@4.0.0-alpha.26","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"contributors":[{"name":"Daniel Belisle","email":"daniel.belisle@aofl.com"},{"name":"Micah Blu","email":"micah.blu@aofl.com"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"921f6f9fc6c68fda6b7503fe765b5064cc6cd074","tarball":"https://registry.npmjs.org/@aofl/api-request/-/api-request-4.0.0-alpha.26.tgz","fileCount":8,"integrity":"sha512-lSAHzGn3C2ZuyYOFt3Xt67LwoSiHw3jBzAisAI7qAhsi7+co2IDETTX8LzImBdROpYXeFDyL00bOZMg4hpdakA==","signatures":[{"sig":"MEUCIQCUljIzpDAXu+7ymkt284NcneXvt3yx9DjZJe/XMHkTcwIgbVExDBl5t6YcDgcWLggujYQ/hj5TLqt6y2X48Btp2j8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24487},"main":"index.js","module":"index.js","readme":"# @aofl/api-request\n\nA module for making api calls easier. Key features include caching responses and request/response formatters.\n\nCaching is implemented using @aofl/cache-manager and uses MemoryCache. @aofl/api-request caches the promises created by fetch api.\n\n\nRequest/response formatting refers to constructing a request payload and parsing the response payload. A formatter object should implement `pack()` and `unpack()` properties. `pack()` is to construct the request payload and `unpack()` is used to parse the response. Any number of formatters can be added to `apiRequestInstance` using the `addFromatter()` method. E.g. `GetFormatter`, `PostFormatter`, `CorsFormatter`, `FileUploadFormatter`, `GoogleMapsFormatter`, ....\n\n[Api Documentation](https://ageoflearning.github.io/aofl/v3.x/api-docs/module-@aofl_api-request.html)\n\n## Examples\n* [Basic Example](https://codesandbox.io/s/github/AgeOfLearning/aofl/tree/v3.0.0/aofl-js-packages/api-request/examples/simple)\n\n## Installation\n```bash\nnpm i -S @aofl/api-request\n```\n\n## Usage\n```javascript\nimport {ApiRequest} from '@aofl/api-request';\n\nclass PostFormatter {\n  static pack(payload) {\n    const headers = new Headers();\n    const body = new FormData();\n\n    if (typeof payload !== 'undefined') {\n      body.append('arguments', JSON.stringify(payload));\n    }\n\n    return {\n      method: 'POST',\n      headers,\n      body,\n      mode: 'cors',\n      credentials: 'include'\n    };\n  }\n\n  static unpack(response) {\n    return response.json()\n    .then((data) => {\n      if (data.status !== 'success') {\n        return Promise.reject(data);\n      }\n      return data;\n    });\n  }\n}\n\nconst apiRequestInstance = new ApiRequest();\napiRequestInstance.addFormatter('post', PostFormatter);\n\napiRequestInstance.request('https://example.org/', {}, 'post', true, 'sample-namespace')\n.then((jsonResponse) => {\n})\n.catch((jsonResponse) => {\n});\n```\n","browser":"dist/index.js","gitHead":"bdd06521b3653befa1b4c07318cc120a700672b2","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"typings":"types.d.ts","_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"7.24.2","description":"A module for simplifying api calls","directories":{},"_nodeVersion":"14.17.6","_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jsdoc":"^3.6.6","cross-env":"^7.0.3","tsd-jsdoc":"^2.5.0","@aofl/cache-manager":"^4.0.0-alpha.26"},"peerDependencies":{"@aofl/cache-manager":"^4.0.0-alpha.9"},"_npmOperationalInternal":{"tmp":"tmp/api-request_4.0.0-alpha.26_1634002471396_0.13796742604916035","host":"s3://npm-registry-packages"}},"4.0.0-alpha.27":{"name":"@aofl/api-request","version":"4.0.0-alpha.27","keywords":["aofljs","@aofl/api-request","api request","api","cache response"],"author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/api-request@4.0.0-alpha.27","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"contributors":[{"name":"Daniel Belisle","email":"daniel.belisle@aofl.com"},{"name":"Micah Blu","email":"micah.blu@aofl.com"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"a7d15632fdbb01536879a7ac84a5710e75af2801","tarball":"https://registry.npmjs.org/@aofl/api-request/-/api-request-4.0.0-alpha.27.tgz","fileCount":8,"integrity":"sha512-CCSU9yBKS3Ekm78lg+dq2R1HbrzjJ2GQV4FR1DLQ/Ne8hhpql+jeB8CnEd2/sSdR7tdAmezohw9N+9wwvBWyUA==","signatures":[{"sig":"MEYCIQCVPuHAl9zo4t+p+bmXasY96jaASzsC3HD0r/wFF7C4LQIhAP2tOiLaKSq3FAQBvJymfQEcycoHSORnNHV44Pdu9sgs","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24487},"main":"index.js","module":"index.js","readme":"# @aofl/api-request\n\nA module for making api calls easier. Key features include caching responses and request/response formatters.\n\nCaching is implemented using @aofl/cache-manager and uses MemoryCache. @aofl/api-request caches the promises created by fetch api.\n\n\nRequest/response formatting refers to constructing a request payload and parsing the response payload. A formatter object should implement `pack()` and `unpack()` properties. `pack()` is to construct the request payload and `unpack()` is used to parse the response. Any number of formatters can be added to `apiRequestInstance` using the `addFromatter()` method. E.g. `GetFormatter`, `PostFormatter`, `CorsFormatter`, `FileUploadFormatter`, `GoogleMapsFormatter`, ....\n\n[Api Documentation](https://ageoflearning.github.io/aofl/v3.x/api-docs/module-@aofl_api-request.html)\n\n## Examples\n* [Basic Example](https://codesandbox.io/s/github/AgeOfLearning/aofl/tree/v3.0.0/aofl-js-packages/api-request/examples/simple)\n\n## Installation\n```bash\nnpm i -S @aofl/api-request\n```\n\n## Usage\n```javascript\nimport {ApiRequest} from '@aofl/api-request';\n\nclass PostFormatter {\n  static pack(payload) {\n    const headers = new Headers();\n    const body = new FormData();\n\n    if (typeof payload !== 'undefined') {\n      body.append('arguments', JSON.stringify(payload));\n    }\n\n    return {\n      method: 'POST',\n      headers,\n      body,\n      mode: 'cors',\n      credentials: 'include'\n    };\n  }\n\n  static unpack(response) {\n    return response.json()\n    .then((data) => {\n      if (data.status !== 'success') {\n        return Promise.reject(data);\n      }\n      return data;\n    });\n  }\n}\n\nconst apiRequestInstance = new ApiRequest();\napiRequestInstance.addFormatter('post', PostFormatter);\n\napiRequestInstance.request('https://example.org/', {}, 'post', true, 'sample-namespace')\n.then((jsonResponse) => {\n})\n.catch((jsonResponse) => {\n});\n```\n","browser":"dist/index.js","gitHead":"bc755f21b39459dc3a8b57ab25075a22313bc107","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"typings":"types.d.ts","_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"7.24.2","description":"A module for simplifying api calls","directories":{},"_nodeVersion":"14.17.6","_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jsdoc":"^3.6.6","cross-env":"^7.0.3","tsd-jsdoc":"^2.5.0","@aofl/cache-manager":"^4.0.0-alpha.27"},"peerDependencies":{"@aofl/cache-manager":"^4.0.0-alpha.9"},"_npmOperationalInternal":{"tmp":"tmp/api-request_4.0.0-alpha.27_1634151990588_0.039137535370034726","host":"s3://npm-registry-packages"}},"4.0.0-alpha.28":{"name":"@aofl/api-request","version":"4.0.0-alpha.28","keywords":["aofljs","@aofl/api-request","api request","api","cache response"],"author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/api-request@4.0.0-alpha.28","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"contributors":[{"name":"Daniel Belisle","email":"daniel.belisle@aofl.com"},{"name":"Micah Blu","email":"micah.blu@aofl.com"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"fab4f960690089d731dfff6528d26c2ee34d48a0","tarball":"https://registry.npmjs.org/@aofl/api-request/-/api-request-4.0.0-alpha.28.tgz","fileCount":8,"integrity":"sha512-jL/kRHaIO7EfbmDjxJnLzNrOHc9QcFb6F+Tt6PRTsYowB0Uydt51uRgfVFVr1B4FDig0ol9XCRnkEUWnTFxWng==","signatures":[{"sig":"MEMCH0KwgavBzHxSALEGOgXwsY5Dk68bcEb7xwEzHR0IJDoCIBHh7aNSmuhDewoa1NRMTK+nLcXDiGa8JMmXGz6RtNhX","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24487},"main":"index.js","module":"index.js","readme":"# @aofl/api-request\n\nA module for making api calls easier. Key features include caching responses and request/response formatters.\n\nCaching is implemented using @aofl/cache-manager and uses MemoryCache. @aofl/api-request caches the promises created by fetch api.\n\n\nRequest/response formatting refers to constructing a request payload and parsing the response payload. A formatter object should implement `pack()` and `unpack()` properties. `pack()` is to construct the request payload and `unpack()` is used to parse the response. Any number of formatters can be added to `apiRequestInstance` using the `addFromatter()` method. E.g. `GetFormatter`, `PostFormatter`, `CorsFormatter`, `FileUploadFormatter`, `GoogleMapsFormatter`, ....\n\n[Api Documentation](https://ageoflearning.github.io/aofl/v3.x/api-docs/module-@aofl_api-request.html)\n\n## Examples\n* [Basic Example](https://codesandbox.io/s/github/AgeOfLearning/aofl/tree/v3.0.0/aofl-js-packages/api-request/examples/simple)\n\n## Installation\n```bash\nnpm i -S @aofl/api-request\n```\n\n## Usage\n```javascript\nimport {ApiRequest} from '@aofl/api-request';\n\nclass PostFormatter {\n  static pack(payload) {\n    const headers = new Headers();\n    const body = new FormData();\n\n    if (typeof payload !== 'undefined') {\n      body.append('arguments', JSON.stringify(payload));\n    }\n\n    return {\n      method: 'POST',\n      headers,\n      body,\n      mode: 'cors',\n      credentials: 'include'\n    };\n  }\n\n  static unpack(response) {\n    return response.json()\n    .then((data) => {\n      if (data.status !== 'success') {\n        return Promise.reject(data);\n      }\n      return data;\n    });\n  }\n}\n\nconst apiRequestInstance = new ApiRequest();\napiRequestInstance.addFormatter('post', PostFormatter);\n\napiRequestInstance.request('https://example.org/', {}, 'post', true, 'sample-namespace')\n.then((jsonResponse) => {\n})\n.catch((jsonResponse) => {\n});\n```\n","browser":"dist/index.js","gitHead":"7dceb248f691c3214f73ba1d048f26b2653bcac1","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"typings":"types.d.ts","_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"7.24.2","description":"A module for simplifying api calls","directories":{},"_nodeVersion":"14.17.6","_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jsdoc":"^3.6.6","cross-env":"^7.0.3","tsd-jsdoc":"^2.5.0","@aofl/cache-manager":"^4.0.0-alpha.28"},"peerDependencies":{"@aofl/cache-manager":"^4.0.0-alpha.9"},"_npmOperationalInternal":{"tmp":"tmp/api-request_4.0.0-alpha.28_1634163502048_0.4438897939440922","host":"s3://npm-registry-packages"}},"4.0.0-alpha.29":{"name":"@aofl/api-request","version":"4.0.0-alpha.29","keywords":["aofljs","@aofl/api-request","api request","api","cache response"],"author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/api-request@4.0.0-alpha.29","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"contributors":[{"name":"Daniel Belisle","email":"daniel.belisle@aofl.com"},{"name":"Micah Blu","email":"micah.blu@aofl.com"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"8ca7f6a9b05d9c492758ce487adf4d0cc1a1f9aa","tarball":"https://registry.npmjs.org/@aofl/api-request/-/api-request-4.0.0-alpha.29.tgz","fileCount":8,"integrity":"sha512-/1gtGrq15zz6tCiAJwOUbGZyvvErTMYgFM6A0DhrJFWDdIMMeeYVfRWDhKVDVxjEGMC3ZPK/yg6Asc6IIXA1rQ==","signatures":[{"sig":"MEUCIQD2Ld2ozAa5DDorC7X13EPe4NSu6lUt31NToAaPONN72wIgOavb83/WqkMQMt02CJA1w3KlH+OtEG+BbExDc9Jao2Y=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24487},"main":"index.js","module":"index.js","readme":"# @aofl/api-request\n\nA module for making api calls easier. Key features include caching responses and request/response formatters.\n\nCaching is implemented using @aofl/cache-manager and uses MemoryCache. @aofl/api-request caches the promises created by fetch api.\n\n\nRequest/response formatting refers to constructing a request payload and parsing the response payload. A formatter object should implement `pack()` and `unpack()` properties. `pack()` is to construct the request payload and `unpack()` is used to parse the response. Any number of formatters can be added to `apiRequestInstance` using the `addFromatter()` method. E.g. `GetFormatter`, `PostFormatter`, `CorsFormatter`, `FileUploadFormatter`, `GoogleMapsFormatter`, ....\n\n[Api Documentation](https://ageoflearning.github.io/aofl/v3.x/api-docs/module-@aofl_api-request.html)\n\n## Examples\n* [Basic Example](https://codesandbox.io/s/github/AgeOfLearning/aofl/tree/v3.0.0/aofl-js-packages/api-request/examples/simple)\n\n## Installation\n```bash\nnpm i -S @aofl/api-request\n```\n\n## Usage\n```javascript\nimport {ApiRequest} from '@aofl/api-request';\n\nclass PostFormatter {\n  static pack(payload) {\n    const headers = new Headers();\n    const body = new FormData();\n\n    if (typeof payload !== 'undefined') {\n      body.append('arguments', JSON.stringify(payload));\n    }\n\n    return {\n      method: 'POST',\n      headers,\n      body,\n      mode: 'cors',\n      credentials: 'include'\n    };\n  }\n\n  static unpack(response) {\n    return response.json()\n    .then((data) => {\n      if (data.status !== 'success') {\n        return Promise.reject(data);\n      }\n      return data;\n    });\n  }\n}\n\nconst apiRequestInstance = new ApiRequest();\napiRequestInstance.addFormatter('post', PostFormatter);\n\napiRequestInstance.request('https://example.org/', {}, 'post', true, 'sample-namespace')\n.then((jsonResponse) => {\n})\n.catch((jsonResponse) => {\n});\n```\n","browser":"dist/index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"typings":"types.d.ts","_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"6.14.11","description":"A module for simplifying api calls","directories":{},"_nodeVersion":"12.20.1","_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jsdoc":"^3.6.6","cross-env":"^7.0.3","tsd-jsdoc":"^2.5.0","@aofl/cache-manager":"^4.0.0-alpha.29"},"peerDependencies":{"@aofl/cache-manager":"^4.0.0-alpha.9"},"_npmOperationalInternal":{"tmp":"tmp/api-request_4.0.0-alpha.29_1634319353830_0.8109724654284183","host":"s3://npm-registry-packages"}},"4.0.0-alpha.30":{"name":"@aofl/api-request","version":"4.0.0-alpha.30","keywords":["aofljs","@aofl/api-request","api request","api","cache response"],"author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/api-request@4.0.0-alpha.30","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"contributors":[{"name":"Daniel Belisle","email":"daniel.belisle@aofl.com"},{"name":"Micah Blu","email":"micah.blu@aofl.com"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"694595de4321e945b8dbbefc50d964c2c6f46171","tarball":"https://registry.npmjs.org/@aofl/api-request/-/api-request-4.0.0-alpha.30.tgz","fileCount":8,"integrity":"sha512-CgH5kKXNzh5pCj5leAo8lmkHBrii+0fkQoiZ1pB5Z55GKBbTRIlPbJmeLV4/Z7rqX4L4+Ds+YDlGk+H9BODSUg==","signatures":[{"sig":"MEQCIBqcvIzbtJhgtwzfRQb0g2S9zSNp247xN8go5Wm4F4JoAiB316GYn42X0YYFh9vEyS7Q2WN0xa9ceIHN3Aaetzg65w==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24487},"main":"index.js","module":"index.js","readme":"# @aofl/api-request\n\nA module for making api calls easier. Key features include caching responses and request/response formatters.\n\nCaching is implemented using @aofl/cache-manager and uses MemoryCache. @aofl/api-request caches the promises created by fetch api.\n\n\nRequest/response formatting refers to constructing a request payload and parsing the response payload. A formatter object should implement `pack()` and `unpack()` properties. `pack()` is to construct the request payload and `unpack()` is used to parse the response. Any number of formatters can be added to `apiRequestInstance` using the `addFromatter()` method. E.g. `GetFormatter`, `PostFormatter`, `CorsFormatter`, `FileUploadFormatter`, `GoogleMapsFormatter`, ....\n\n[Api Documentation](https://ageoflearning.github.io/aofl/v3.x/api-docs/module-@aofl_api-request.html)\n\n## Examples\n* [Basic Example](https://codesandbox.io/s/github/AgeOfLearning/aofl/tree/v3.0.0/aofl-js-packages/api-request/examples/simple)\n\n## Installation\n```bash\nnpm i -S @aofl/api-request\n```\n\n## Usage\n```javascript\nimport {ApiRequest} from '@aofl/api-request';\n\nclass PostFormatter {\n  static pack(payload) {\n    const headers = new Headers();\n    const body = new FormData();\n\n    if (typeof payload !== 'undefined') {\n      body.append('arguments', JSON.stringify(payload));\n    }\n\n    return {\n      method: 'POST',\n      headers,\n      body,\n      mode: 'cors',\n      credentials: 'include'\n    };\n  }\n\n  static unpack(response) {\n    return response.json()\n    .then((data) => {\n      if (data.status !== 'success') {\n        return Promise.reject(data);\n      }\n      return data;\n    });\n  }\n}\n\nconst apiRequestInstance = new ApiRequest();\napiRequestInstance.addFormatter('post', PostFormatter);\n\napiRequestInstance.request('https://example.org/', {}, 'post', true, 'sample-namespace')\n.then((jsonResponse) => {\n})\n.catch((jsonResponse) => {\n});\n```\n","browser":"dist/index.js","gitHead":"13ed83fe4429533b22fd669328dd6c8829dffec0","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"typings":"types.d.ts","_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"7.24.2","description":"A module for simplifying api calls","directories":{},"_nodeVersion":"14.17.6","_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jsdoc":"^3.6.6","cross-env":"^7.0.3","tsd-jsdoc":"^2.5.0","@aofl/cache-manager":"^4.0.0-alpha.30"},"peerDependencies":{"@aofl/cache-manager":"^4.0.0-alpha.9"},"_npmOperationalInternal":{"tmp":"tmp/api-request_4.0.0-alpha.30_1634323860920_0.9811554151501036","host":"s3://npm-registry-packages"}},"4.0.0-alpha.31":{"name":"@aofl/api-request","version":"4.0.0-alpha.31","keywords":["aofljs","@aofl/api-request","api request","api","cache response"],"author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/api-request@4.0.0-alpha.31","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"contributors":[{"name":"Daniel Belisle","email":"daniel.belisle@aofl.com"},{"name":"Micah Blu","email":"micah.blu@aofl.com"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"feed271ffc8e21fcc31f21ded82b32a3ab5dc138","tarball":"https://registry.npmjs.org/@aofl/api-request/-/api-request-4.0.0-alpha.31.tgz","fileCount":8,"integrity":"sha512-vEnFAiouRuif+QXpbB92RBD/+NrPaZY1yBcb+dbKZdkUOFua0hcDGApf4/6jJP77NwbPFy0H7zZL1C/vguvdGA==","signatures":[{"sig":"MEUCIFI4fsC1y63VIk2KtstTNa+DKGJuAfwoknSINWxGpQkSAiEA12mmyIvq0cY+S7PneHP973kUO8icZ2n7BpRqtSlmjWY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24487},"main":"index.js","module":"index.js","readme":"# @aofl/api-request\n\nA module for making api calls easier. Key features include caching responses and request/response formatters.\n\nCaching is implemented using @aofl/cache-manager and uses MemoryCache. @aofl/api-request caches the promises created by fetch api.\n\n\nRequest/response formatting refers to constructing a request payload and parsing the response payload. A formatter object should implement `pack()` and `unpack()` properties. `pack()` is to construct the request payload and `unpack()` is used to parse the response. Any number of formatters can be added to `apiRequestInstance` using the `addFromatter()` method. E.g. `GetFormatter`, `PostFormatter`, `CorsFormatter`, `FileUploadFormatter`, `GoogleMapsFormatter`, ....\n\n[Api Documentation](https://ageoflearning.github.io/aofl/v3.x/api-docs/module-@aofl_api-request.html)\n\n## Examples\n* [Basic Example](https://codesandbox.io/s/github/AgeOfLearning/aofl/tree/v3.0.0/aofl-js-packages/api-request/examples/simple)\n\n## Installation\n```bash\nnpm i -S @aofl/api-request\n```\n\n## Usage\n```javascript\nimport {ApiRequest} from '@aofl/api-request';\n\nclass PostFormatter {\n  static pack(payload) {\n    const headers = new Headers();\n    const body = new FormData();\n\n    if (typeof payload !== 'undefined') {\n      body.append('arguments', JSON.stringify(payload));\n    }\n\n    return {\n      method: 'POST',\n      headers,\n      body,\n      mode: 'cors',\n      credentials: 'include'\n    };\n  }\n\n  static unpack(response) {\n    return response.json()\n    .then((data) => {\n      if (data.status !== 'success') {\n        return Promise.reject(data);\n      }\n      return data;\n    });\n  }\n}\n\nconst apiRequestInstance = new ApiRequest();\napiRequestInstance.addFormatter('post', PostFormatter);\n\napiRequestInstance.request('https://example.org/', {}, 'post', true, 'sample-namespace')\n.then((jsonResponse) => {\n})\n.catch((jsonResponse) => {\n});\n```\n","browser":"dist/index.js","gitHead":"5bc1713dfbc60e5029713b6ad88a4a9fd46d3413","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"typings":"types.d.ts","_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"7.24.2","description":"A module for simplifying api calls","directories":{},"_nodeVersion":"14.17.6","_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jsdoc":"^3.6.6","cross-env":"^7.0.3","tsd-jsdoc":"^2.5.0","@aofl/cache-manager":"^4.0.0-alpha.31"},"peerDependencies":{"@aofl/cache-manager":"^4.0.0-alpha.9"},"_npmOperationalInternal":{"tmp":"tmp/api-request_4.0.0-alpha.31_1634324123555_0.793260385590167","host":"s3://npm-registry-packages"}},"4.0.0-alpha.32":{"name":"@aofl/api-request","version":"4.0.0-alpha.32","keywords":["aofljs","@aofl/api-request","api request","api","cache response"],"author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/api-request@4.0.0-alpha.32","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"contributors":[{"name":"Daniel Belisle","email":"daniel.belisle@aofl.com"},{"name":"Micah Blu","email":"micah.blu@aofl.com"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"1f2f932899cde31d388e5abb134b719eaabe7b30","tarball":"https://registry.npmjs.org/@aofl/api-request/-/api-request-4.0.0-alpha.32.tgz","fileCount":8,"integrity":"sha512-SeWaKbLwBgMoFYTVLlGBwTWMXnub/yRgztXWbIe3vUGMFGnbFlp8MYgtj8KWOUm5aHp1Wc1QuJm6jLL/zS0lPw==","signatures":[{"sig":"MEYCIQDrYbyNqR03HDG60ii2Mhvt3i/HJHMqphbbvaGC4iWJZQIhAIeFD3C8m9E0CQ/XPt8QXZKZ9FR+bVQMefaB7E/NsLXo","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24487},"main":"index.js","module":"index.js","readme":"# @aofl/api-request\n\nA module for making api calls easier. Key features include caching responses and request/response formatters.\n\nCaching is implemented using @aofl/cache-manager and uses MemoryCache. @aofl/api-request caches the promises created by fetch api.\n\n\nRequest/response formatting refers to constructing a request payload and parsing the response payload. A formatter object should implement `pack()` and `unpack()` properties. `pack()` is to construct the request payload and `unpack()` is used to parse the response. Any number of formatters can be added to `apiRequestInstance` using the `addFromatter()` method. E.g. `GetFormatter`, `PostFormatter`, `CorsFormatter`, `FileUploadFormatter`, `GoogleMapsFormatter`, ....\n\n[Api Documentation](https://ageoflearning.github.io/aofl/v3.x/api-docs/module-@aofl_api-request.html)\n\n## Examples\n* [Basic Example](https://codesandbox.io/s/github/AgeOfLearning/aofl/tree/v3.0.0/aofl-js-packages/api-request/examples/simple)\n\n## Installation\n```bash\nnpm i -S @aofl/api-request\n```\n\n## Usage\n```javascript\nimport {ApiRequest} from '@aofl/api-request';\n\nclass PostFormatter {\n  static pack(payload) {\n    const headers = new Headers();\n    const body = new FormData();\n\n    if (typeof payload !== 'undefined') {\n      body.append('arguments', JSON.stringify(payload));\n    }\n\n    return {\n      method: 'POST',\n      headers,\n      body,\n      mode: 'cors',\n      credentials: 'include'\n    };\n  }\n\n  static unpack(response) {\n    return response.json()\n    .then((data) => {\n      if (data.status !== 'success') {\n        return Promise.reject(data);\n      }\n      return data;\n    });\n  }\n}\n\nconst apiRequestInstance = new ApiRequest();\napiRequestInstance.addFormatter('post', PostFormatter);\n\napiRequestInstance.request('https://example.org/', {}, 'post', true, 'sample-namespace')\n.then((jsonResponse) => {\n})\n.catch((jsonResponse) => {\n});\n```\n","browser":"dist/index.js","gitHead":"77786a7e5219aff408e59d051e8380ca1a63021d","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"typings":"types.d.ts","_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"7.24.2","description":"A module for simplifying api calls","directories":{},"_nodeVersion":"14.17.6","_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jsdoc":"^3.6.6","cross-env":"^7.0.3","tsd-jsdoc":"^2.5.0","@aofl/cache-manager":"^4.0.0-alpha.32"},"peerDependencies":{"@aofl/cache-manager":"^4.0.0-alpha.9"},"_npmOperationalInternal":{"tmp":"tmp/api-request_4.0.0-alpha.32_1634326786102_0.4056197551655012","host":"s3://npm-registry-packages"}},"4.0.0-alpha.33":{"name":"@aofl/api-request","version":"4.0.0-alpha.33","keywords":["aofljs","@aofl/api-request","api request","api","cache response"],"author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/api-request@4.0.0-alpha.33","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"contributors":[{"name":"Daniel Belisle","email":"daniel.belisle@aofl.com"},{"name":"Micah Blu","email":"micah.blu@aofl.com"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"2fcd6434bf33a0eb2cc9d42dfac771d2f8f0941b","tarball":"https://registry.npmjs.org/@aofl/api-request/-/api-request-4.0.0-alpha.33.tgz","fileCount":8,"integrity":"sha512-DE/QuvFCgCejJl4KPddctHf2AiLomKJ3MYyZB5xSX3/x6uDucqsH7CHc9W54FYM2QxpmiXyYaGPfilbURBmGfg==","signatures":[{"sig":"MEYCIQC2K7KK24g9AP9qQojeMDTAy/Hw47CUbm5Jlqr7jVYQPQIhANy1cuBV0RgWhbbDkEgMtTnZVZAn5in9bFzGNPbI1hu0","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24487},"main":"index.js","module":"index.js","readme":"# @aofl/api-request\n\nA module for making api calls easier. Key features include caching responses and request/response formatters.\n\nCaching is implemented using @aofl/cache-manager and uses MemoryCache. @aofl/api-request caches the promises created by fetch api.\n\n\nRequest/response formatting refers to constructing a request payload and parsing the response payload. A formatter object should implement `pack()` and `unpack()` properties. `pack()` is to construct the request payload and `unpack()` is used to parse the response. Any number of formatters can be added to `apiRequestInstance` using the `addFromatter()` method. E.g. `GetFormatter`, `PostFormatter`, `CorsFormatter`, `FileUploadFormatter`, `GoogleMapsFormatter`, ....\n\n[Api Documentation](https://ageoflearning.github.io/aofl/v3.x/api-docs/module-@aofl_api-request.html)\n\n## Examples\n* [Basic Example](https://codesandbox.io/s/github/AgeOfLearning/aofl/tree/v3.0.0/aofl-js-packages/api-request/examples/simple)\n\n## Installation\n```bash\nnpm i -S @aofl/api-request\n```\n\n## Usage\n```javascript\nimport {ApiRequest} from '@aofl/api-request';\n\nclass PostFormatter {\n  static pack(payload) {\n    const headers = new Headers();\n    const body = new FormData();\n\n    if (typeof payload !== 'undefined') {\n      body.append('arguments', JSON.stringify(payload));\n    }\n\n    return {\n      method: 'POST',\n      headers,\n      body,\n      mode: 'cors',\n      credentials: 'include'\n    };\n  }\n\n  static unpack(response) {\n    return response.json()\n    .then((data) => {\n      if (data.status !== 'success') {\n        return Promise.reject(data);\n      }\n      return data;\n    });\n  }\n}\n\nconst apiRequestInstance = new ApiRequest();\napiRequestInstance.addFormatter('post', PostFormatter);\n\napiRequestInstance.request('https://example.org/', {}, 'post', true, 'sample-namespace')\n.then((jsonResponse) => {\n})\n.catch((jsonResponse) => {\n});\n```\n","browser":"dist/index.js","gitHead":"41b432602965620ce989f21e02748f53f69f7ea5","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"typings":"types.d.ts","_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"7.24.2","description":"A module for simplifying api calls","directories":{},"_nodeVersion":"14.17.6","_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jsdoc":"^3.6.6","cross-env":"^7.0.3","tsd-jsdoc":"^2.5.0","@aofl/cache-manager":"^4.0.0-alpha.33"},"peerDependencies":{"@aofl/cache-manager":"^4.0.0-alpha.9"},"_npmOperationalInternal":{"tmp":"tmp/api-request_4.0.0-alpha.33_1634326985774_0.2261746732908405","host":"s3://npm-registry-packages"}},"4.0.0-alpha.34":{"name":"@aofl/api-request","version":"4.0.0-alpha.34","keywords":["aofljs","@aofl/api-request","api request","api","cache response"],"author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/api-request@4.0.0-alpha.34","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"contributors":[{"name":"Daniel Belisle","email":"daniel.belisle@aofl.com"},{"name":"Micah Blu","email":"micah.blu@aofl.com"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"6ba7ca676d4c6f849f66587531da2e0790258156","tarball":"https://registry.npmjs.org/@aofl/api-request/-/api-request-4.0.0-alpha.34.tgz","fileCount":8,"integrity":"sha512-QEZNT8/eD3kotEItecTZLes64J3txxqNbOudn/uWPeFG6vGMQvxGfsWeADRy19D7keyq9PXTAfVSLTKotxvDjw==","signatures":[{"sig":"MEQCIFYgfRUNhRxC2sAgl7aCx7nduYwSV2hdR2XlgN3eri65AiBd6bRSQsGpwlNqQ14zeQJ9aeVbzwxANF7JpF4og4j8MA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24487},"main":"index.js","module":"index.js","readme":"# @aofl/api-request\n\nA module for making api calls easier. Key features include caching responses and request/response formatters.\n\nCaching is implemented using @aofl/cache-manager and uses MemoryCache. @aofl/api-request caches the promises created by fetch api.\n\n\nRequest/response formatting refers to constructing a request payload and parsing the response payload. A formatter object should implement `pack()` and `unpack()` properties. `pack()` is to construct the request payload and `unpack()` is used to parse the response. Any number of formatters can be added to `apiRequestInstance` using the `addFromatter()` method. E.g. `GetFormatter`, `PostFormatter`, `CorsFormatter`, `FileUploadFormatter`, `GoogleMapsFormatter`, ....\n\n[Api Documentation](https://ageoflearning.github.io/aofl/v3.x/api-docs/module-@aofl_api-request.html)\n\n## Examples\n* [Basic Example](https://codesandbox.io/s/github/AgeOfLearning/aofl/tree/v3.0.0/aofl-js-packages/api-request/examples/simple)\n\n## Installation\n```bash\nnpm i -S @aofl/api-request\n```\n\n## Usage\n```javascript\nimport {ApiRequest} from '@aofl/api-request';\n\nclass PostFormatter {\n  static pack(payload) {\n    const headers = new Headers();\n    const body = new FormData();\n\n    if (typeof payload !== 'undefined') {\n      body.append('arguments', JSON.stringify(payload));\n    }\n\n    return {\n      method: 'POST',\n      headers,\n      body,\n      mode: 'cors',\n      credentials: 'include'\n    };\n  }\n\n  static unpack(response) {\n    return response.json()\n    .then((data) => {\n      if (data.status !== 'success') {\n        return Promise.reject(data);\n      }\n      return data;\n    });\n  }\n}\n\nconst apiRequestInstance = new ApiRequest();\napiRequestInstance.addFormatter('post', PostFormatter);\n\napiRequestInstance.request('https://example.org/', {}, 'post', true, 'sample-namespace')\n.then((jsonResponse) => {\n})\n.catch((jsonResponse) => {\n});\n```\n","browser":"dist/index.js","gitHead":"1b993e65b04444692f40eaecfc3dfbb29d50d98b","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"typings":"types.d.ts","_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"7.24.2","description":"A module for simplifying api calls","directories":{},"_nodeVersion":"14.17.6","_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jsdoc":"^3.6.6","cross-env":"^7.0.3","tsd-jsdoc":"^2.5.0","@aofl/cache-manager":"^4.0.0-alpha.34"},"peerDependencies":{"@aofl/cache-manager":"^4.0.0-alpha.9"},"_npmOperationalInternal":{"tmp":"tmp/api-request_4.0.0-alpha.34_1634327591577_0.6257618373378335","host":"s3://npm-registry-packages"}},"4.0.0-alpha.35":{"name":"@aofl/api-request","version":"4.0.0-alpha.35","keywords":["aofljs","@aofl/api-request","api request","api","cache response"],"author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/api-request@4.0.0-alpha.35","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"contributors":[{"name":"Daniel Belisle","email":"daniel.belisle@aofl.com"},{"name":"Micah Blu","email":"micah.blu@aofl.com"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"f060bbc169734e5ad09c2f72ce85e530265f4ef7","tarball":"https://registry.npmjs.org/@aofl/api-request/-/api-request-4.0.0-alpha.35.tgz","fileCount":8,"integrity":"sha512-9FkMZ1LvmT2Pot2IRkVpamctL76Ww1rKBnm3DoSz1rkgJVmJSaaBn2Fx5Vxwzy9OPA8HrU2GaY0zOZlzyDXgng==","signatures":[{"sig":"MEQCIFIRrt+oHWoedpWwx9FkBWifsdc8lKjFR8H1vSHk5YFwAiA4dSaiw04V21gLPS2XPPXWUEkattYm7MZqiE3nBUMV1g==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24487},"main":"index.js","module":"index.js","readme":"# @aofl/api-request\n\nA module for making api calls easier. Key features include caching responses and request/response formatters.\n\nCaching is implemented using @aofl/cache-manager and uses MemoryCache. @aofl/api-request caches the promises created by fetch api.\n\n\nRequest/response formatting refers to constructing a request payload and parsing the response payload. A formatter object should implement `pack()` and `unpack()` properties. `pack()` is to construct the request payload and `unpack()` is used to parse the response. Any number of formatters can be added to `apiRequestInstance` using the `addFromatter()` method. E.g. `GetFormatter`, `PostFormatter`, `CorsFormatter`, `FileUploadFormatter`, `GoogleMapsFormatter`, ....\n\n[Api Documentation](https://ageoflearning.github.io/aofl/v3.x/api-docs/module-@aofl_api-request.html)\n\n## Examples\n* [Basic Example](https://codesandbox.io/s/github/AgeOfLearning/aofl/tree/v3.0.0/aofl-js-packages/api-request/examples/simple)\n\n## Installation\n```bash\nnpm i -S @aofl/api-request\n```\n\n## Usage\n```javascript\nimport {ApiRequest} from '@aofl/api-request';\n\nclass PostFormatter {\n  static pack(payload) {\n    const headers = new Headers();\n    const body = new FormData();\n\n    if (typeof payload !== 'undefined') {\n      body.append('arguments', JSON.stringify(payload));\n    }\n\n    return {\n      method: 'POST',\n      headers,\n      body,\n      mode: 'cors',\n      credentials: 'include'\n    };\n  }\n\n  static unpack(response) {\n    return response.json()\n    .then((data) => {\n      if (data.status !== 'success') {\n        return Promise.reject(data);\n      }\n      return data;\n    });\n  }\n}\n\nconst apiRequestInstance = new ApiRequest();\napiRequestInstance.addFormatter('post', PostFormatter);\n\napiRequestInstance.request('https://example.org/', {}, 'post', true, 'sample-namespace')\n.then((jsonResponse) => {\n})\n.catch((jsonResponse) => {\n});\n```\n","browser":"dist/index.js","gitHead":"5a6a7f303fc21acc73b55413f38f534ed4bfb714","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"typings":"types.d.ts","_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"7.24.2","description":"A module for simplifying api calls","directories":{},"_nodeVersion":"14.17.6","_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jsdoc":"^3.6.6","cross-env":"^7.0.3","tsd-jsdoc":"^2.5.0","@aofl/cache-manager":"^4.0.0-alpha.35"},"peerDependencies":{"@aofl/cache-manager":"^4.0.0-alpha.9"},"_npmOperationalInternal":{"tmp":"tmp/api-request_4.0.0-alpha.35_1634328015213_0.6165157776268231","host":"s3://npm-registry-packages"}},"4.0.0-alpha.36":{"name":"@aofl/api-request","version":"4.0.0-alpha.36","keywords":["aofljs","@aofl/api-request","api request","api","cache response"],"author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/api-request@4.0.0-alpha.36","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"contributors":[{"name":"Daniel Belisle","email":"daniel.belisle@aofl.com"},{"name":"Micah Blu","email":"micah.blu@aofl.com"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"e6462e6d909320c317e122d0e1286564f53f1513","tarball":"https://registry.npmjs.org/@aofl/api-request/-/api-request-4.0.0-alpha.36.tgz","fileCount":8,"integrity":"sha512-xL8QpKIVlvet6HQCcoJ/+HzZ0VXf66tiUqeiZaJq/1eqKzZgs1MjLQEfIRvYHDreGRgs6thGRNA2o2T5MkXcmw==","signatures":[{"sig":"MEQCICpXoHwvH/Ck5bR1c+jJ9Kgm/NLEEyPg/6VmvfNWSIqCAiAmmdR1xCIwYRIRMqK44XAKxOZ1YLfIPaAwxvwy2K5ZYg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24487},"main":"index.js","module":"index.js","readme":"# @aofl/api-request\n\nA module for making api calls easier. Key features include caching responses and request/response formatters.\n\nCaching is implemented using @aofl/cache-manager and uses MemoryCache. @aofl/api-request caches the promises created by fetch api.\n\n\nRequest/response formatting refers to constructing a request payload and parsing the response payload. A formatter object should implement `pack()` and `unpack()` properties. `pack()` is to construct the request payload and `unpack()` is used to parse the response. Any number of formatters can be added to `apiRequestInstance` using the `addFromatter()` method. E.g. `GetFormatter`, `PostFormatter`, `CorsFormatter`, `FileUploadFormatter`, `GoogleMapsFormatter`, ....\n\n[Api Documentation](https://ageoflearning.github.io/aofl/v3.x/api-docs/module-@aofl_api-request.html)\n\n## Examples\n* [Basic Example](https://codesandbox.io/s/github/AgeOfLearning/aofl/tree/v3.0.0/aofl-js-packages/api-request/examples/simple)\n\n## Installation\n```bash\nnpm i -S @aofl/api-request\n```\n\n## Usage\n```javascript\nimport {ApiRequest} from '@aofl/api-request';\n\nclass PostFormatter {\n  static pack(payload) {\n    const headers = new Headers();\n    const body = new FormData();\n\n    if (typeof payload !== 'undefined') {\n      body.append('arguments', JSON.stringify(payload));\n    }\n\n    return {\n      method: 'POST',\n      headers,\n      body,\n      mode: 'cors',\n      credentials: 'include'\n    };\n  }\n\n  static unpack(response) {\n    return response.json()\n    .then((data) => {\n      if (data.status !== 'success') {\n        return Promise.reject(data);\n      }\n      return data;\n    });\n  }\n}\n\nconst apiRequestInstance = new ApiRequest();\napiRequestInstance.addFormatter('post', PostFormatter);\n\napiRequestInstance.request('https://example.org/', {}, 'post', true, 'sample-namespace')\n.then((jsonResponse) => {\n})\n.catch((jsonResponse) => {\n});\n```\n","browser":"dist/index.js","gitHead":"24aeaf86244b6f9f352b26d04fd9976f9430bfe7","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"typings":"types.d.ts","_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"7.24.2","description":"A module for simplifying api calls","directories":{},"_nodeVersion":"14.17.6","_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jsdoc":"^3.6.6","cross-env":"^7.0.3","tsd-jsdoc":"^2.5.0","@aofl/cache-manager":"^4.0.0-alpha.36"},"peerDependencies":{"@aofl/cache-manager":"^4.0.0-alpha.9"},"_npmOperationalInternal":{"tmp":"tmp/api-request_4.0.0-alpha.36_1634328221752_0.43342179354049515","host":"s3://npm-registry-packages"}},"4.0.0-alpha.37":{"name":"@aofl/api-request","version":"4.0.0-alpha.37","keywords":["aofljs","@aofl/api-request","api request","api","cache response"],"author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/api-request@4.0.0-alpha.37","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"contributors":[{"name":"Daniel Belisle","email":"daniel.belisle@aofl.com"},{"name":"Micah Blu","email":"micah.blu@aofl.com"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"6aaf316c5cb111ef0d24c61da43e5af506fca603","tarball":"https://registry.npmjs.org/@aofl/api-request/-/api-request-4.0.0-alpha.37.tgz","fileCount":8,"integrity":"sha512-F4h8hKC0vMoWtUn1Td6cVLyxDM2iuTPyJp41iTaN7/gfEjJ4rTJJyXPBbYPNT2fOOjMZOM+OeRbdYyy7sy2ofw==","signatures":[{"sig":"MEYCIQCZaXQ/ggcHhqr+KJI8rG+gsiYplSA4Bb/FnhJQ4cWSowIhAIar7IN6Suw+7H7IQGV04f+oO27DaPDK0vplNfsGpA/2","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24487},"main":"index.js","module":"index.js","readme":"# @aofl/api-request\n\nA module for making api calls easier. Key features include caching responses and request/response formatters.\n\nCaching is implemented using @aofl/cache-manager and uses MemoryCache. @aofl/api-request caches the promises created by fetch api.\n\n\nRequest/response formatting refers to constructing a request payload and parsing the response payload. A formatter object should implement `pack()` and `unpack()` properties. `pack()` is to construct the request payload and `unpack()` is used to parse the response. Any number of formatters can be added to `apiRequestInstance` using the `addFromatter()` method. E.g. `GetFormatter`, `PostFormatter`, `CorsFormatter`, `FileUploadFormatter`, `GoogleMapsFormatter`, ....\n\n[Api Documentation](https://ageoflearning.github.io/aofl/v3.x/api-docs/module-@aofl_api-request.html)\n\n## Examples\n* [Basic Example](https://codesandbox.io/s/github/AgeOfLearning/aofl/tree/v3.0.0/aofl-js-packages/api-request/examples/simple)\n\n## Installation\n```bash\nnpm i -S @aofl/api-request\n```\n\n## Usage\n```javascript\nimport {ApiRequest} from '@aofl/api-request';\n\nclass PostFormatter {\n  static pack(payload) {\n    const headers = new Headers();\n    const body = new FormData();\n\n    if (typeof payload !== 'undefined') {\n      body.append('arguments', JSON.stringify(payload));\n    }\n\n    return {\n      method: 'POST',\n      headers,\n      body,\n      mode: 'cors',\n      credentials: 'include'\n    };\n  }\n\n  static unpack(response) {\n    return response.json()\n    .then((data) => {\n      if (data.status !== 'success') {\n        return Promise.reject(data);\n      }\n      return data;\n    });\n  }\n}\n\nconst apiRequestInstance = new ApiRequest();\napiRequestInstance.addFormatter('post', PostFormatter);\n\napiRequestInstance.request('https://example.org/', {}, 'post', true, 'sample-namespace')\n.then((jsonResponse) => {\n})\n.catch((jsonResponse) => {\n});\n```\n","browser":"dist/index.js","gitHead":"d5e9c5a7ef77e315b759fb5bee226aa3bd3aaffb","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"typings":"types.d.ts","_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"7.24.2","description":"A module for simplifying api calls","directories":{},"_nodeVersion":"14.17.6","_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jsdoc":"^3.6.6","cross-env":"^7.0.3","tsd-jsdoc":"^2.5.0","@aofl/cache-manager":"^4.0.0-alpha.37"},"peerDependencies":{"@aofl/cache-manager":"^4.0.0-alpha.9"},"_npmOperationalInternal":{"tmp":"tmp/api-request_4.0.0-alpha.37_1634328389427_0.07375411948861976","host":"s3://npm-registry-packages"}},"4.0.0-alpha.38":{"name":"@aofl/api-request","version":"4.0.0-alpha.38","keywords":["aofljs","@aofl/api-request","api request","api","cache response"],"author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/api-request@4.0.0-alpha.38","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"contributors":[{"name":"Daniel Belisle","email":"daniel.belisle@aofl.com"},{"name":"Micah Blu","email":"micah.blu@aofl.com"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"91469825b6921e3e138984d1ca306f484418797e","tarball":"https://registry.npmjs.org/@aofl/api-request/-/api-request-4.0.0-alpha.38.tgz","fileCount":8,"integrity":"sha512-qa65reOqe/jNSPjiPdrt+mzwAOLbT5PCpAVF9TrzkruGmdu4B5htpCwIWv9G6mokgyvMVmz+0Dw0Ghd95RNorg==","signatures":[{"sig":"MEYCIQDPEgkx7CNQgEItV40A+VBVbMcoLXQYV3QmzRA/cIK5DAIhAMTrz6CY3DUdja5hf1sLdvoXLsfRfGteWYMlEjpjNGWV","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24487},"main":"index.js","module":"index.js","readme":"# @aofl/api-request\n\nA module for making api calls easier. Key features include caching responses and request/response formatters.\n\nCaching is implemented using @aofl/cache-manager and uses MemoryCache. @aofl/api-request caches the promises created by fetch api.\n\n\nRequest/response formatting refers to constructing a request payload and parsing the response payload. A formatter object should implement `pack()` and `unpack()` properties. `pack()` is to construct the request payload and `unpack()` is used to parse the response. Any number of formatters can be added to `apiRequestInstance` using the `addFromatter()` method. E.g. `GetFormatter`, `PostFormatter`, `CorsFormatter`, `FileUploadFormatter`, `GoogleMapsFormatter`, ....\n\n[Api Documentation](https://ageoflearning.github.io/aofl/v3.x/api-docs/module-@aofl_api-request.html)\n\n## Examples\n* [Basic Example](https://codesandbox.io/s/github/AgeOfLearning/aofl/tree/v3.0.0/aofl-js-packages/api-request/examples/simple)\n\n## Installation\n```bash\nnpm i -S @aofl/api-request\n```\n\n## Usage\n```javascript\nimport {ApiRequest} from '@aofl/api-request';\n\nclass PostFormatter {\n  static pack(payload) {\n    const headers = new Headers();\n    const body = new FormData();\n\n    if (typeof payload !== 'undefined') {\n      body.append('arguments', JSON.stringify(payload));\n    }\n\n    return {\n      method: 'POST',\n      headers,\n      body,\n      mode: 'cors',\n      credentials: 'include'\n    };\n  }\n\n  static unpack(response) {\n    return response.json()\n    .then((data) => {\n      if (data.status !== 'success') {\n        return Promise.reject(data);\n      }\n      return data;\n    });\n  }\n}\n\nconst apiRequestInstance = new ApiRequest();\napiRequestInstance.addFormatter('post', PostFormatter);\n\napiRequestInstance.request('https://example.org/', {}, 'post', true, 'sample-namespace')\n.then((jsonResponse) => {\n})\n.catch((jsonResponse) => {\n});\n```\n","browser":"dist/index.js","gitHead":"91457836070b2b300b852a461787c56ec880a85d","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"typings":"types.d.ts","_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"7.24.2","description":"A module for simplifying api calls","directories":{},"_nodeVersion":"14.17.6","_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jsdoc":"^3.6.6","cross-env":"^7.0.3","tsd-jsdoc":"^2.5.0","@aofl/cache-manager":"^4.0.0-alpha.38"},"peerDependencies":{"@aofl/cache-manager":"^4.0.0-alpha.9"},"_npmOperationalInternal":{"tmp":"tmp/api-request_4.0.0-alpha.38_1634330767166_0.8406464912131333","host":"s3://npm-registry-packages"}},"4.0.0-alpha.39":{"name":"@aofl/api-request","version":"4.0.0-alpha.39","keywords":["aofljs","@aofl/api-request","api request","api","cache response"],"author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/api-request@4.0.0-alpha.39","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"contributors":[{"name":"Daniel Belisle","email":"daniel.belisle@aofl.com"},{"name":"Micah Blu","email":"micah.blu@aofl.com"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"220f0573179595307aac4430a03204b918342274","tarball":"https://registry.npmjs.org/@aofl/api-request/-/api-request-4.0.0-alpha.39.tgz","fileCount":8,"integrity":"sha512-qWCN129ZndJuYLms4RK/XlPaBIi52MTpOEP6dl90e51qPmJ9COUn37wAPlzK7UzJr4EOn/eEuA8Obu8S4OFHJg==","signatures":[{"sig":"MEUCIDKG1ca5JW+rRn7HamN1BvWBU+25LhXQttEKZdoZBdtpAiEAiC2IgDXlRA5+lKRBjFNVqFbTezF94h0phI8zQzilp74=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24487},"main":"index.js","module":"index.js","readme":"# @aofl/api-request\n\nA module for making api calls easier. Key features include caching responses and request/response formatters.\n\nCaching is implemented using @aofl/cache-manager and uses MemoryCache. @aofl/api-request caches the promises created by fetch api.\n\n\nRequest/response formatting refers to constructing a request payload and parsing the response payload. A formatter object should implement `pack()` and `unpack()` properties. `pack()` is to construct the request payload and `unpack()` is used to parse the response. Any number of formatters can be added to `apiRequestInstance` using the `addFromatter()` method. E.g. `GetFormatter`, `PostFormatter`, `CorsFormatter`, `FileUploadFormatter`, `GoogleMapsFormatter`, ....\n\n[Api Documentation](https://ageoflearning.github.io/aofl/v3.x/api-docs/module-@aofl_api-request.html)\n\n## Examples\n* [Basic Example](https://codesandbox.io/s/github/AgeOfLearning/aofl/tree/v3.0.0/aofl-js-packages/api-request/examples/simple)\n\n## Installation\n```bash\nnpm i -S @aofl/api-request\n```\n\n## Usage\n```javascript\nimport {ApiRequest} from '@aofl/api-request';\n\nclass PostFormatter {\n  static pack(payload) {\n    const headers = new Headers();\n    const body = new FormData();\n\n    if (typeof payload !== 'undefined') {\n      body.append('arguments', JSON.stringify(payload));\n    }\n\n    return {\n      method: 'POST',\n      headers,\n      body,\n      mode: 'cors',\n      credentials: 'include'\n    };\n  }\n\n  static unpack(response) {\n    return response.json()\n    .then((data) => {\n      if (data.status !== 'success') {\n        return Promise.reject(data);\n      }\n      return data;\n    });\n  }\n}\n\nconst apiRequestInstance = new ApiRequest();\napiRequestInstance.addFormatter('post', PostFormatter);\n\napiRequestInstance.request('https://example.org/', {}, 'post', true, 'sample-namespace')\n.then((jsonResponse) => {\n})\n.catch((jsonResponse) => {\n});\n```\n","browser":"dist/index.js","gitHead":"f4c22e986eb7eb2e564e469dedb36c65858bf5cc","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"typings":"types.d.ts","_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"7.24.2","description":"A module for simplifying api calls","directories":{},"_nodeVersion":"14.17.6","_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jsdoc":"^3.6.6","cross-env":"^7.0.3","tsd-jsdoc":"^2.5.0","@aofl/cache-manager":"^4.0.0-alpha.39"},"peerDependencies":{"@aofl/cache-manager":"^4.0.0-alpha.9"},"_npmOperationalInternal":{"tmp":"tmp/api-request_4.0.0-alpha.39_1634332204023_0.41641392425538526","host":"s3://npm-registry-packages"}},"4.0.0-alpha.40":{"name":"@aofl/api-request","version":"4.0.0-alpha.40","keywords":["aofljs","@aofl/api-request","api request","api","cache response"],"author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/api-request@4.0.0-alpha.40","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"contributors":[{"name":"Daniel Belisle","email":"daniel.belisle@aofl.com"},{"name":"Micah Blu","email":"micah.blu@aofl.com"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"927278293e514b933f18dc6a4e8f3e62dd015791","tarball":"https://registry.npmjs.org/@aofl/api-request/-/api-request-4.0.0-alpha.40.tgz","fileCount":8,"integrity":"sha512-cHfzKKsWhki0aGQ/FGLLw3lexUgcFYDDdHKrGZTULmjYwbrMU5f8v+EA6YipH5p+TRAAhq7qIaMXw/OHla6GWg==","signatures":[{"sig":"MEUCIDMLA8uptENx6fZINaMzwwpbJNN8tr/5Fvo/OxJ9PSxvAiEAoq8KnaRcaUyQYvbC54MFMy9kz4wOJNmle8mNLQwR6WI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24487},"main":"index.js","module":"index.js","readme":"# @aofl/api-request\n\nA module for making api calls easier. Key features include caching responses and request/response formatters.\n\nCaching is implemented using @aofl/cache-manager and uses MemoryCache. @aofl/api-request caches the promises created by fetch api.\n\n\nRequest/response formatting refers to constructing a request payload and parsing the response payload. A formatter object should implement `pack()` and `unpack()` properties. `pack()` is to construct the request payload and `unpack()` is used to parse the response. Any number of formatters can be added to `apiRequestInstance` using the `addFromatter()` method. E.g. `GetFormatter`, `PostFormatter`, `CorsFormatter`, `FileUploadFormatter`, `GoogleMapsFormatter`, ....\n\n[Api Documentation](https://ageoflearning.github.io/aofl/v3.x/api-docs/module-@aofl_api-request.html)\n\n## Examples\n* [Basic Example](https://codesandbox.io/s/github/AgeOfLearning/aofl/tree/v3.0.0/aofl-js-packages/api-request/examples/simple)\n\n## Installation\n```bash\nnpm i -S @aofl/api-request\n```\n\n## Usage\n```javascript\nimport {ApiRequest} from '@aofl/api-request';\n\nclass PostFormatter {\n  static pack(payload) {\n    const headers = new Headers();\n    const body = new FormData();\n\n    if (typeof payload !== 'undefined') {\n      body.append('arguments', JSON.stringify(payload));\n    }\n\n    return {\n      method: 'POST',\n      headers,\n      body,\n      mode: 'cors',\n      credentials: 'include'\n    };\n  }\n\n  static unpack(response) {\n    return response.json()\n    .then((data) => {\n      if (data.status !== 'success') {\n        return Promise.reject(data);\n      }\n      return data;\n    });\n  }\n}\n\nconst apiRequestInstance = new ApiRequest();\napiRequestInstance.addFormatter('post', PostFormatter);\n\napiRequestInstance.request('https://example.org/', {}, 'post', true, 'sample-namespace')\n.then((jsonResponse) => {\n})\n.catch((jsonResponse) => {\n});\n```\n","browser":"dist/index.js","gitHead":"e93b1f585c2cd94383438abd74737a856ca68a77","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"typings":"types.d.ts","_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"7.24.2","description":"A module for simplifying api calls","directories":{},"_nodeVersion":"14.17.6","_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jsdoc":"^3.6.6","cross-env":"^7.0.3","tsd-jsdoc":"^2.5.0","@aofl/cache-manager":"^4.0.0-alpha.40"},"peerDependencies":{"@aofl/cache-manager":"^4.0.0-alpha.9"},"_npmOperationalInternal":{"tmp":"tmp/api-request_4.0.0-alpha.40_1634332799113_0.5988107190631871","host":"s3://npm-registry-packages"}},"4.0.0-alpha.41":{"name":"@aofl/api-request","version":"4.0.0-alpha.41","keywords":["aofljs","@aofl/api-request","api request","api","cache response"],"author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/api-request@4.0.0-alpha.41","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"contributors":[{"name":"Daniel Belisle","email":"daniel.belisle@aofl.com"},{"name":"Micah Blu","email":"micah.blu@aofl.com"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"b9f4b998d52801f91d71fac8dfae121e721bdb53","tarball":"https://registry.npmjs.org/@aofl/api-request/-/api-request-4.0.0-alpha.41.tgz","fileCount":8,"integrity":"sha512-ZMO0k7NxWE0oysyz+lRjY0EM/zMF4YH/e5/0PFbbpLIsLi1wjZ2hxhp7Dov57bPfYycFws5lNzvz/dJ0ft5N0Q==","signatures":[{"sig":"MEUCIQCrQL9UkfE1EqUHPdMi4pbMd2h+57xNOOu/tT/CbRej7wIgIIl7tmPgY+cay5nDSokddkgk4pN7TMRaw0a9YmpMaRo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24487},"main":"index.js","module":"index.js","readme":"# @aofl/api-request\n\nA module for making api calls easier. Key features include caching responses and request/response formatters.\n\nCaching is implemented using @aofl/cache-manager and uses MemoryCache. @aofl/api-request caches the promises created by fetch api.\n\n\nRequest/response formatting refers to constructing a request payload and parsing the response payload. A formatter object should implement `pack()` and `unpack()` properties. `pack()` is to construct the request payload and `unpack()` is used to parse the response. Any number of formatters can be added to `apiRequestInstance` using the `addFromatter()` method. E.g. `GetFormatter`, `PostFormatter`, `CorsFormatter`, `FileUploadFormatter`, `GoogleMapsFormatter`, ....\n\n[Api Documentation](https://ageoflearning.github.io/aofl/v3.x/api-docs/module-@aofl_api-request.html)\n\n## Examples\n* [Basic Example](https://codesandbox.io/s/github/AgeOfLearning/aofl/tree/v3.0.0/aofl-js-packages/api-request/examples/simple)\n\n## Installation\n```bash\nnpm i -S @aofl/api-request\n```\n\n## Usage\n```javascript\nimport {ApiRequest} from '@aofl/api-request';\n\nclass PostFormatter {\n  static pack(payload) {\n    const headers = new Headers();\n    const body = new FormData();\n\n    if (typeof payload !== 'undefined') {\n      body.append('arguments', JSON.stringify(payload));\n    }\n\n    return {\n      method: 'POST',\n      headers,\n      body,\n      mode: 'cors',\n      credentials: 'include'\n    };\n  }\n\n  static unpack(response) {\n    return response.json()\n    .then((data) => {\n      if (data.status !== 'success') {\n        return Promise.reject(data);\n      }\n      return data;\n    });\n  }\n}\n\nconst apiRequestInstance = new ApiRequest();\napiRequestInstance.addFormatter('post', PostFormatter);\n\napiRequestInstance.request('https://example.org/', {}, 'post', true, 'sample-namespace')\n.then((jsonResponse) => {\n})\n.catch((jsonResponse) => {\n});\n```\n","browser":"dist/index.js","gitHead":"cbd55bfa3cf5e87bf7b5f27b3d9b6efb34e3ad85","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"typings":"types.d.ts","_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"7.24.2","description":"A module for simplifying api calls","directories":{},"_nodeVersion":"14.17.6","_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jsdoc":"^3.6.6","cross-env":"^7.0.3","tsd-jsdoc":"^2.5.0","@aofl/cache-manager":"^4.0.0-alpha.41"},"peerDependencies":{"@aofl/cache-manager":"^4.0.0-alpha.9"},"_npmOperationalInternal":{"tmp":"tmp/api-request_4.0.0-alpha.41_1634582065639_0.2653661122008981","host":"s3://npm-registry-packages"}},"4.0.0-alpha.42":{"name":"@aofl/api-request","version":"4.0.0-alpha.42","keywords":["aofljs","@aofl/api-request","api request","api","cache response"],"author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/api-request@4.0.0-alpha.42","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"contributors":[{"name":"Daniel Belisle","email":"daniel.belisle@aofl.com"},{"name":"Micah Blu","email":"micah.blu@aofl.com"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"9c9ff3f7e6a08a7e39e36a5a65ac2890d3aeeaaf","tarball":"https://registry.npmjs.org/@aofl/api-request/-/api-request-4.0.0-alpha.42.tgz","fileCount":8,"integrity":"sha512-0PBQhB4odPmqL7cdeq8Y0boXP1Kcvn3QIuum0wFq4imD2dM3geQXd0u0DyVKZvv/6FaZKP0Nx5fPOwuNLPMhwA==","signatures":[{"sig":"MEUCIQD8+6hOxlZLPmnnc6g52vZTVan7z+DkGboyBR18EQHcBwIgMqpdA6PXF5gP4igDAaezycC6Fo08r9JjMNMbtCeOV1o=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24487},"main":"index.js","module":"index.js","readme":"# @aofl/api-request\n\nA module for making api calls easier. Key features include caching responses and request/response formatters.\n\nCaching is implemented using @aofl/cache-manager and uses MemoryCache. @aofl/api-request caches the promises created by fetch api.\n\n\nRequest/response formatting refers to constructing a request payload and parsing the response payload. A formatter object should implement `pack()` and `unpack()` properties. `pack()` is to construct the request payload and `unpack()` is used to parse the response. Any number of formatters can be added to `apiRequestInstance` using the `addFromatter()` method. E.g. `GetFormatter`, `PostFormatter`, `CorsFormatter`, `FileUploadFormatter`, `GoogleMapsFormatter`, ....\n\n[Api Documentation](https://ageoflearning.github.io/aofl/v3.x/api-docs/module-@aofl_api-request.html)\n\n## Examples\n* [Basic Example](https://codesandbox.io/s/github/AgeOfLearning/aofl/tree/v3.0.0/aofl-js-packages/api-request/examples/simple)\n\n## Installation\n```bash\nnpm i -S @aofl/api-request\n```\n\n## Usage\n```javascript\nimport {ApiRequest} from '@aofl/api-request';\n\nclass PostFormatter {\n  static pack(payload) {\n    const headers = new Headers();\n    const body = new FormData();\n\n    if (typeof payload !== 'undefined') {\n      body.append('arguments', JSON.stringify(payload));\n    }\n\n    return {\n      method: 'POST',\n      headers,\n      body,\n      mode: 'cors',\n      credentials: 'include'\n    };\n  }\n\n  static unpack(response) {\n    return response.json()\n    .then((data) => {\n      if (data.status !== 'success') {\n        return Promise.reject(data);\n      }\n      return data;\n    });\n  }\n}\n\nconst apiRequestInstance = new ApiRequest();\napiRequestInstance.addFormatter('post', PostFormatter);\n\napiRequestInstance.request('https://example.org/', {}, 'post', true, 'sample-namespace')\n.then((jsonResponse) => {\n})\n.catch((jsonResponse) => {\n});\n```\n","browser":"dist/index.js","gitHead":"f64d10ec558694ce4c2d4e8b0562d4167f8e28d5","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"typings":"types.d.ts","_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"7.24.2","description":"A module for simplifying api calls","directories":{},"_nodeVersion":"14.17.6","_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jsdoc":"^3.6.6","cross-env":"^7.0.3","tsd-jsdoc":"^2.5.0","@aofl/cache-manager":"^4.0.0-alpha.42"},"peerDependencies":{"@aofl/cache-manager":"^4.0.0-alpha.9"},"_npmOperationalInternal":{"tmp":"tmp/api-request_4.0.0-alpha.42_1634586030676_0.540392709208269","host":"s3://npm-registry-packages"}},"4.0.0-alpha.43":{"name":"@aofl/api-request","version":"4.0.0-alpha.43","keywords":["aofljs","@aofl/api-request","api request","api","cache response"],"author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/api-request@4.0.0-alpha.43","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"contributors":[{"name":"Daniel Belisle","email":"daniel.belisle@aofl.com"},{"name":"Micah Blu","email":"micah.blu@aofl.com"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"6a20256814b54e931edccdc316e428abda69a946","tarball":"https://registry.npmjs.org/@aofl/api-request/-/api-request-4.0.0-alpha.43.tgz","fileCount":8,"integrity":"sha512-YJY88cuH9xuJMXeDaJgrefhxcEyZ4bNXevbhdB45iCyJEgUdsCGUPim/QI6XP/KKFdOESbUbFVANPmnNWd3JiQ==","signatures":[{"sig":"MEYCIQCaj4TEawiR6Xg6GuZPu2OyUsm9VqO3p3FVpp5q294idgIhAJ04cNmZRIRScMNpr11XTFrZupUflCP1GGUahWZDRXKd","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24487},"main":"index.js","module":"index.js","readme":"# @aofl/api-request\n\nA module for making api calls easier. Key features include caching responses and request/response formatters.\n\nCaching is implemented using @aofl/cache-manager and uses MemoryCache. @aofl/api-request caches the promises created by fetch api.\n\n\nRequest/response formatting refers to constructing a request payload and parsing the response payload. A formatter object should implement `pack()` and `unpack()` properties. `pack()` is to construct the request payload and `unpack()` is used to parse the response. Any number of formatters can be added to `apiRequestInstance` using the `addFromatter()` method. E.g. `GetFormatter`, `PostFormatter`, `CorsFormatter`, `FileUploadFormatter`, `GoogleMapsFormatter`, ....\n\n[Api Documentation](https://ageoflearning.github.io/aofl/v3.x/api-docs/module-@aofl_api-request.html)\n\n## Examples\n* [Basic Example](https://codesandbox.io/s/github/AgeOfLearning/aofl/tree/v3.0.0/aofl-js-packages/api-request/examples/simple)\n\n## Installation\n```bash\nnpm i -S @aofl/api-request\n```\n\n## Usage\n```javascript\nimport {ApiRequest} from '@aofl/api-request';\n\nclass PostFormatter {\n  static pack(payload) {\n    const headers = new Headers();\n    const body = new FormData();\n\n    if (typeof payload !== 'undefined') {\n      body.append('arguments', JSON.stringify(payload));\n    }\n\n    return {\n      method: 'POST',\n      headers,\n      body,\n      mode: 'cors',\n      credentials: 'include'\n    };\n  }\n\n  static unpack(response) {\n    return response.json()\n    .then((data) => {\n      if (data.status !== 'success') {\n        return Promise.reject(data);\n      }\n      return data;\n    });\n  }\n}\n\nconst apiRequestInstance = new ApiRequest();\napiRequestInstance.addFormatter('post', PostFormatter);\n\napiRequestInstance.request('https://example.org/', {}, 'post', true, 'sample-namespace')\n.then((jsonResponse) => {\n})\n.catch((jsonResponse) => {\n});\n```\n","browser":"dist/index.js","gitHead":"6763365b38cb5be764e669a3b568be9f1cc4cfed","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"typings":"types.d.ts","_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"7.24.2","description":"A module for simplifying api calls","directories":{},"_nodeVersion":"14.17.6","_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jsdoc":"^3.6.6","cross-env":"^7.0.3","tsd-jsdoc":"^2.5.0","@aofl/cache-manager":"^4.0.0-alpha.43"},"peerDependencies":{"@aofl/cache-manager":"^4.0.0-alpha.9"},"_npmOperationalInternal":{"tmp":"tmp/api-request_4.0.0-alpha.43_1634586286255_0.8279583645296376","host":"s3://npm-registry-packages"}},"4.0.0-alpha.44":{"name":"@aofl/api-request","version":"4.0.0-alpha.44","keywords":["aofljs","@aofl/api-request","api request","api","cache response"],"author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/api-request@4.0.0-alpha.44","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"contributors":[{"name":"Daniel Belisle","email":"daniel.belisle@aofl.com"},{"name":"Micah Blu","email":"micah.blu@aofl.com"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"5c4381f200ff3a254840c2701393ee3ba82becf1","tarball":"https://registry.npmjs.org/@aofl/api-request/-/api-request-4.0.0-alpha.44.tgz","fileCount":8,"integrity":"sha512-EJpTglK9yxHi6e4ImaKIWMd6te/TDGH+vpWvk7YgnCY+MC9SHedH8Xhbaj4XWrIThDwOP/2Ez3YxRscyzMx/jg==","signatures":[{"sig":"MEQCICmz1r8GfKoJcW8euyCtEsDvxh3Rx4owN6cRo9e9eXWjAiB81K17g9oKszVYKry73FRpjFKxUURhJQuE749F7fGNoQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24487},"main":"index.js","module":"index.js","readme":"# @aofl/api-request\n\nA module for making api calls easier. Key features include caching responses and request/response formatters.\n\nCaching is implemented using @aofl/cache-manager and uses MemoryCache. @aofl/api-request caches the promises created by fetch api.\n\n\nRequest/response formatting refers to constructing a request payload and parsing the response payload. A formatter object should implement `pack()` and `unpack()` properties. `pack()` is to construct the request payload and `unpack()` is used to parse the response. Any number of formatters can be added to `apiRequestInstance` using the `addFromatter()` method. E.g. `GetFormatter`, `PostFormatter`, `CorsFormatter`, `FileUploadFormatter`, `GoogleMapsFormatter`, ....\n\n[Api Documentation](https://ageoflearning.github.io/aofl/v3.x/api-docs/module-@aofl_api-request.html)\n\n## Examples\n* [Basic Example](https://codesandbox.io/s/github/AgeOfLearning/aofl/tree/v3.0.0/aofl-js-packages/api-request/examples/simple)\n\n## Installation\n```bash\nnpm i -S @aofl/api-request\n```\n\n## Usage\n```javascript\nimport {ApiRequest} from '@aofl/api-request';\n\nclass PostFormatter {\n  static pack(payload) {\n    const headers = new Headers();\n    const body = new FormData();\n\n    if (typeof payload !== 'undefined') {\n      body.append('arguments', JSON.stringify(payload));\n    }\n\n    return {\n      method: 'POST',\n      headers,\n      body,\n      mode: 'cors',\n      credentials: 'include'\n    };\n  }\n\n  static unpack(response) {\n    return response.json()\n    .then((data) => {\n      if (data.status !== 'success') {\n        return Promise.reject(data);\n      }\n      return data;\n    });\n  }\n}\n\nconst apiRequestInstance = new ApiRequest();\napiRequestInstance.addFormatter('post', PostFormatter);\n\napiRequestInstance.request('https://example.org/', {}, 'post', true, 'sample-namespace')\n.then((jsonResponse) => {\n})\n.catch((jsonResponse) => {\n});\n```\n","browser":"dist/index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"typings":"types.d.ts","_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"6.14.11","description":"A module for simplifying api calls","directories":{},"_nodeVersion":"12.20.1","_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jsdoc":"^3.6.6","cross-env":"^7.0.3","tsd-jsdoc":"^2.5.0","@aofl/cache-manager":"^4.0.0-alpha.44"},"peerDependencies":{"@aofl/cache-manager":"^4.0.0-alpha.9"},"_npmOperationalInternal":{"tmp":"tmp/api-request_4.0.0-alpha.44_1635874772317_0.22605323221114482","host":"s3://npm-registry-packages"}},"4.0.0-alpha.45":{"name":"@aofl/api-request","version":"4.0.0-alpha.45","keywords":["aofljs","@aofl/api-request","api request","api","cache response"],"author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/api-request@4.0.0-alpha.45","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"contributors":[{"name":"Daniel Belisle","email":"daniel.belisle@aofl.com"},{"name":"Micah Blu","email":"micah.blu@aofl.com"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"330f8d60943acd5d5cf2c009a79e08a16c8ab4be","tarball":"https://registry.npmjs.org/@aofl/api-request/-/api-request-4.0.0-alpha.45.tgz","fileCount":8,"integrity":"sha512-swPHvbK50fjY9TLh3p3neeOfbo+cX5ho7ZEd42IvYrw9xdkvFzKA+7f8hOV8YY0GNRHmHpFA1X/0j735cxIMrQ==","signatures":[{"sig":"MEUCIDiHEcrMoFwQO4+aBWmFaeHM1+tPMzycOtjxiRO5FlLfAiEArPR+jlqWMsHWawZI2W+C7Rf3XQN+beya7bjROUc8yeM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24487},"main":"index.js","module":"index.js","readme":"# @aofl/api-request\n\nA module for making api calls easier. Key features include caching responses and request/response formatters.\n\nCaching is implemented using @aofl/cache-manager and uses MemoryCache. @aofl/api-request caches the promises created by fetch api.\n\n\nRequest/response formatting refers to constructing a request payload and parsing the response payload. A formatter object should implement `pack()` and `unpack()` properties. `pack()` is to construct the request payload and `unpack()` is used to parse the response. Any number of formatters can be added to `apiRequestInstance` using the `addFromatter()` method. E.g. `GetFormatter`, `PostFormatter`, `CorsFormatter`, `FileUploadFormatter`, `GoogleMapsFormatter`, ....\n\n[Api Documentation](https://ageoflearning.github.io/aofl/v3.x/api-docs/module-@aofl_api-request.html)\n\n## Examples\n* [Basic Example](https://codesandbox.io/s/github/AgeOfLearning/aofl/tree/v3.0.0/aofl-js-packages/api-request/examples/simple)\n\n## Installation\n```bash\nnpm i -S @aofl/api-request\n```\n\n## Usage\n```javascript\nimport {ApiRequest} from '@aofl/api-request';\n\nclass PostFormatter {\n  static pack(payload) {\n    const headers = new Headers();\n    const body = new FormData();\n\n    if (typeof payload !== 'undefined') {\n      body.append('arguments', JSON.stringify(payload));\n    }\n\n    return {\n      method: 'POST',\n      headers,\n      body,\n      mode: 'cors',\n      credentials: 'include'\n    };\n  }\n\n  static unpack(response) {\n    return response.json()\n    .then((data) => {\n      if (data.status !== 'success') {\n        return Promise.reject(data);\n      }\n      return data;\n    });\n  }\n}\n\nconst apiRequestInstance = new ApiRequest();\napiRequestInstance.addFormatter('post', PostFormatter);\n\napiRequestInstance.request('https://example.org/', {}, 'post', true, 'sample-namespace')\n.then((jsonResponse) => {\n})\n.catch((jsonResponse) => {\n});\n```\n","browser":"dist/index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"typings":"types.d.ts","_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"6.14.11","description":"A module for simplifying api calls","directories":{},"_nodeVersion":"12.20.1","_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jsdoc":"^3.6.6","cross-env":"^7.0.3","tsd-jsdoc":"^2.5.0","@aofl/cache-manager":"^4.0.0-alpha.45"},"peerDependencies":{"@aofl/cache-manager":"^4.0.0-alpha.9"},"_npmOperationalInternal":{"tmp":"tmp/api-request_4.0.0-alpha.45_1635876952361_0.232979901734385","host":"s3://npm-registry-packages"}},"3.14.0":{"name":"@aofl/api-request","version":"3.14.0","keywords":["aofljs","@aofl/api-request","api request","api","cache response"],"author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/api-request@3.14.0","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"contributors":[{"name":"Daniel Belisle","email":"daniel.belisle@aofl.com"},{"name":"Micah Blu","email":"micah.blu@aofl.com"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"b5f5d0c152685da04d610274df633c11af2d4b36","tarball":"https://registry.npmjs.org/@aofl/api-request/-/api-request-3.14.0.tgz","fileCount":9,"integrity":"sha512-U70HzJpsajZY7irwgOYat70JKr2aw7lfsVnDaGeRL9J3MMhh5Fo5281cIQMVGnMAlceqLaa4CLk1qs1qhwWn3w==","signatures":[{"sig":"MEQCIAKCWOyw55ullAh3rPY43wPE/W1NrLJ1pfv3nL2oydyNAiApUwnSIp/X5thykeN9S2CIafurSipIJpix37m+YU0r9w==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":28666,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiM8/fACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpKthAAkNjft0R92aqbx0veSA7F9CGxHdF3WLFN+aoavnLWnSYji1bH\r\nz6xPCzM/T2+NWBUqzzjXAEdTfZVNFRcShO7m2jXUWKVekwvlRbNbsFJ5sW5J\r\nc3cHI8VFTTV+cFZF0JJafQztYkLGKNLCDFsdvppvZQnQP37dvRF0KfK8rrb4\r\nFjO3jCDK4xRr4zatXtgkG33M5LCdG92ofIr7Ueu7acQ+T4fN1Xf8tWu+k4pT\r\ndXQNLdGU9of0h0OlYqyeGw7C8iY9Phydb+oIGSxR2nJZj6Z6TXioBim+ONcy\r\nHp6csgSqaaWN4MNkjO4sBE8NpYJ10GeIFWRD2x462uMxIxk19C72OgneZytU\r\nlaBmWxzTV46gRC6mAiihOyzx61cEPtiUyFaANJS/XRSJtONRwtYLK6wiKl44\r\nlzti+WIYiZ03HCh4xcv0LVE3NAwaEF5uX9yCYPvviDk4kgwyePvd0ymj2c+H\r\nEJMznaK88XsPhQMdBGCV5q6FhgiJQxiwhIrsUOuzUtsFmCPVEGS5Tnmw07LD\r\nbyio+DEcf+pb+WS5jUJ6y4MKrnniCzcIEW8HfjM1Jr1tcEWFa7PtPNHlTosq\r\npHbKgIw4Tsb79j3E0z5wN8LwwHCzXTY0NoWyFcX0Qgf+ROEW6gNK1HAvcTyd\r\nFy8G+49doIqRkN9csCNb7WX5hJKt5d//UOI=\r\n=ug4w\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","module":"index.js","browser":"dist/index.js","gitHead":"01a200342c31c108d1ab1039ee4c972f2ee63fa9","scripts":{"docs":"npx jsdoc -c .jsdocrc.json .","test":"echo \"Error: no test specified\" && exit 1","build":"cross-env NODE_ENV=production aofl build","build-ci":"cross-env NODE_ENV=production aofl build --debug","build:dev":"cross-env NODE_ENV=development aofl build","prepublishOnly":"npm run build-ci && npm run docs"},"typings":"types.d.ts","_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v12.20.1+x64 (darwin)","description":"A module for simplifying api calls","directories":{},"_nodeVersion":"12.20.1","_hasShrinkwrap":false,"devDependencies":{"jsdoc":"^3.6.3","@aofl/cli":"^3.14.0","cross-env":"^6.0.3","tsd-jsdoc":"^2.4.0","@aofl/cache-manager":"^3.14.0"},"peerDependencies":{"@aofl/cache-manager":">= 3.0.0-beta.1 < 4.0.0"},"_npmOperationalInternal":{"tmp":"tmp/api-request_3.14.0_1647562718832_0.7778735328227124","host":"s3://npm-registry-packages"}},"3.14.1":{"name":"@aofl/api-request","version":"3.14.1","keywords":["aofljs","@aofl/api-request","api request","api","cache response"],"author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/api-request@3.14.1","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"contributors":[{"name":"Daniel Belisle","email":"daniel.belisle@aofl.com"},{"name":"Micah Blu","email":"micah.blu@aofl.com"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"829d4ed76ccf7340304c6ebb6b335ed6062ed943","tarball":"https://registry.npmjs.org/@aofl/api-request/-/api-request-3.14.1.tgz","fileCount":9,"integrity":"sha512-4gSp7BXhA6wTBPWxHMel0hynlHgHG17HzDtBI6sV6PTgYfjiPR1hLN9z5+8muFN/fx/bQh+MtAF2RdXeqOGvUQ==","signatures":[{"sig":"MEUCIHk9ZFDJIbGpCYTqhrrCQCZC/d/f/1ZPji6xm9ymfS98AiEAnNVc7oGtsAONxvnes50mUHJbbi4kAaBQp8uo8ibvw90=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":28666,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiM9bTACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmqdsw/6A7yqTun2Zft9KOjLXchzsuCUdX2PFiWvUlihI5XQmnrXSz6B\r\nGlaNOfuBNvxlj/p5ivatiIU4GlOqNfOYHlPXVEathUnFs6hSi3sAPElpW8u5\r\nH1X3C0Mp+ndRuJkrpDIMgnxi+dFZ7+S9//oW7G/P89xfOve2vmyEVhTGGSEe\r\n2lzQflH6/Vh1KNJaOiF5u2mEYBubSa7MWELmkScBAmyNtNoo7hdAEbkth07Q\r\n7EFawNRCFOrg1yhJKV0jThza81Yo6nIpm9wdqlsOfVR34CwQOvRHR10UzzpU\r\nD+gP5xkFBPfOfTzMM1arr1b2ZrrbgmlV8fGyjnW7i2F2lT+BOOxMljtA2t1R\r\n8Y/u2itabSmCfnL7WvYyqAeMi53u0NPmSvZa2pOgfaaFb+QIKOh+SGX9Dzvx\r\nbXgVXgVR4Y4CEJ0f13Aht0sCs4Ot5sK5JCbpKYdHI8yk0xu29NGYdXCePSjx\r\n3zCN8TxejPb/4xRk6VyTR7BYAT9KAym7/eTk2KW03asDdl3NPigHhP7NPmnz\r\ny8lquY+9xDIAnunArcdiAELUvxQjCtTqPphxJZY/2tA9c/06hx/v0wGESNhZ\r\n/EbHSpUaIAzyDaJy8VDQWBfoXSo393AhAngKBePu0egm0nTsyeOJrPUnsbWM\r\noaw6iDC2U12lchRtyR2kNjZlwekGpGASXNo=\r\n=pwun\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","module":"index.js","browser":"dist/index.js","gitHead":"65857163479f835ec51cc1e23ec01c45eab43008","scripts":{"docs":"npx jsdoc -c .jsdocrc.json .","test":"echo \"Error: no test specified\" && exit 1","build":"cross-env NODE_ENV=production aofl build","build-ci":"cross-env NODE_ENV=production aofl build --debug","build:dev":"cross-env NODE_ENV=development aofl build","prepublishOnly":"npm run build-ci && npm run docs"},"typings":"types.d.ts","_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v12.20.1+x64 (darwin)","description":"A module for simplifying api calls","directories":{},"_nodeVersion":"12.20.1","_hasShrinkwrap":false,"devDependencies":{"jsdoc":"^3.6.3","@aofl/cli":"^3.14.1","cross-env":"^6.0.3","tsd-jsdoc":"^2.4.0","@aofl/cache-manager":"^3.14.1"},"peerDependencies":{"@aofl/cache-manager":">= 3.0.0-beta.1 < 4.0.0"},"_npmOperationalInternal":{"tmp":"tmp/api-request_3.14.1_1647564499518_0.3070211464693675","host":"s3://npm-registry-packages"}}},"time":{"created":"2018-02-16T00:09:26.016Z","modified":"2025-01-18T00:20:36.295Z","1.0.0-beta.1":"2018-02-16T00:09:26.065Z","1.0.0-beta.2":"2018-03-10T01:15:46.032Z","1.0.0-beta.3":"2018-03-18T20:39:12.490Z","1.0.0-beta.4":"2018-04-06T23:34:47.018Z","1.0.0-beta.5":"2018-04-27T01:13:18.290Z","1.0.0-beta.20":"2018-07-24T23:42:54.703Z","1.0.0-beta.21":"2018-08-05T07:42:47.856Z","1.0.0-beta.22":"2018-08-10T19:18:48.323Z","1.0.0-beta.23":"2018-08-16T21:23:51.914Z","1.0.0-beta.25":"2018-08-23T19:25:36.824Z","1.0.0-beta.26":"2018-08-27T18:18:14.195Z","1.0.0-beta.27":"2018-09-11T18:05:41.720Z","1.0.0-beta.27.1":"2018-09-12T23:12:18.363Z","1.0.0-beta.28":"2018-09-28T00:25:15.643Z","1.0.0-beta.28.1":"2018-09-28T00:25:39.919Z","1.0.0":"2018-09-29T23:00:09.086Z","1.0.1":"2018-09-29T23:09:46.989Z","1.1.0":"2018-10-17T22:03:52.175Z","1.1.2":"2018-10-29T19:31:41.650Z","1.2.0":"2018-11-06T20:45:42.659Z","1.2.1":"2018-11-18T21:05:20.844Z","1.2.3":"2018-11-21T00:17:28.002Z","1.3.0":"2018-12-06T20:58:09.864Z","1.4.0":"2018-12-28T02:37:11.195Z","1.4.1":"2019-01-07T18:33:28.591Z","1.5.0-alpha.2":"2019-01-17T22:54:46.127Z","2.0.0-alpha.1":"2019-01-29T01:54:01.349Z","2.0.0-alpha.5":"2019-02-26T23:15:31.478Z","2.0.0-alpha.16":"2019-04-25T19:57:52.736Z","2.0.0-alpha.17":"2019-04-26T18:36:02.360Z","2.0.0":"2019-04-30T19:31:56.786Z","3.0.0-0":"2019-09-17T05:22:07.201Z","3.0.0-alpha.0":"2019-09-17T05:24:05.433Z","3.0.0-alpha.5":"2019-09-20T06:32:43.740Z","3.0.0-alpha.9":"2019-09-26T20:58:31.682Z","3.0.0-alpha.11":"2019-09-27T06:49:33.744Z","3.0.0-beta.5":"2019-10-06T10:05:13.326Z","3.0.0-beta.6":"2019-10-08T04:49:37.983Z","3.0.0-beta.8":"2019-10-08T05:48:11.395Z","3.0.0-beta.9":"2019-10-08T06:11:37.370Z","3.0.0-beta.11":"2019-10-08T09:42:48.789Z","3.0.0-beta.12":"2019-10-08T09:53:34.643Z","3.0.0-beta.13":"2019-10-09T04:13:21.726Z","3.0.0-beta.14":"2019-10-09T04:33:02.932Z","3.0.0-beta.15":"2019-10-09T04:50:41.444Z","3.0.0-beta.16":"2019-10-09T05:05:59.073Z","3.0.0-beta.22":"2019-10-11T04:40:47.644Z","3.0.0-beta.23":"2019-10-11T05:39:52.464Z","3.0.0-beta.24":"2019-10-11T06:34:42.960Z","3.0.0-beta.25":"2019-10-11T07:34:45.980Z","3.0.0-beta.26":"2019-10-11T07:49:05.789Z","3.0.0-beta.27":"2019-10-11T07:53:59.359Z","3.0.0-beta.28":"2019-10-11T08:01:01.301Z","3.0.0-beta.30":"2019-10-11T22:58:42.135Z","3.0.0-beta.32":"2019-10-14T01:02:38.611Z","3.0.0-beta.35":"2019-10-18T06:59:10.111Z","3.0.0-beta.36":"2019-10-19T10:45:51.261Z","3.0.0-beta.37":"2019-10-24T06:07:54.614Z","3.0.0-beta.38":"2019-10-30T22:52:23.191Z","3.0.0-alpha.12":"2019-11-02T01:11:47.501Z","3.0.0-beta.40":"2019-11-11T22:31:15.651Z","3.0.0-beta.41":"2019-11-12T04:55:36.222Z","3.0.0-beta.42":"2019-11-12T05:53:44.211Z","3.0.0-beta.46":"2019-11-14T21:58:15.355Z","3.0.0-beta.47":"2019-11-15T00:48:45.865Z","3.0.0-beta.48":"2019-11-16T23:36:00.634Z","3.0.0-beta.49":"2019-11-17T03:37:53.340Z","3.0.0":"2019-11-17T07:06:06.950Z","3.1.0":"2019-11-22T03:28:11.376Z","3.2.0":"2019-11-24T07:34:45.569Z","3.2.1":"2019-11-24T08:03:48.622Z","3.2.2-alpha.2":"2020-01-14T20:27:38.511Z","3.2.2-alpha.3":"2020-01-14T21:12:58.613Z","3.3.0":"2020-01-22T23:31:19.932Z","3.5.0-beta.1":"2020-02-22T23:26:40.425Z","3.5.0-beta.2":"2020-02-22T23:52:41.784Z","3.5.0-beta.3":"2020-02-23T00:07:25.045Z","3.5.0-beta.4":"2020-02-23T01:57:29.675Z","3.5.0-beta.5":"2020-02-23T03:10:07.667Z","3.5.0-beta.6":"2020-02-23T03:17:49.501Z","3.5.0-beta.7":"2020-02-23T05:05:36.633Z","3.5.0-beta.8":"2020-02-23T05:08:41.555Z","3.5.0-beta.9":"2020-02-23T05:33:08.045Z","3.5.0-beta.10":"2020-02-23T05:50:29.893Z","3.5.0-beta.11":"2020-02-23T07:37:17.617Z","3.5.0-beta.12":"2020-02-23T09:00:13.415Z","3.5.0-beta.13":"2020-02-23T09:02:13.196Z","3.5.0-beta.14":"2020-02-23T10:00:12.963Z","3.5.0-beta.15":"2020-02-23T11:49:18.849Z","3.5.0-beta.16":"2020-02-23T11:58:41.018Z","3.5.0-beta.17":"2020-02-23T12:14:29.950Z","3.5.0-beta.18":"2020-02-25T03:59:36.419Z","3.5.0-beta.19":"2020-02-25T23:57:11.007Z","3.5.0-beta.20":"2020-03-02T23:22:44.487Z","3.5.0-beta.21":"2020-03-02T23:27:05.969Z","3.5.0-beta.22":"2020-03-02T23:42:18.179Z","3.5.0":"2020-03-03T00:03:02.445Z","3.6.1":"2020-03-10T18:42:56.810Z","3.8.0":"2020-05-12T19:19:32.759Z","3.9.0-alpha.0":"2020-05-12T19:29:58.566Z","3.8.1":"2020-05-12T19:40:50.565Z","3.9.0":"2020-05-15T17:58:11.607Z","3.10.0":"2020-05-15T21:15:27.248Z","3.12.0":"2021-01-20T00:01:46.424Z","3.12.1":"2021-01-20T00:12:44.608Z","4.0.0-alpha.9":"2021-02-03T01:48:06.425Z","4.0.0-alpha.10":"2021-02-03T01:56:12.655Z","4.0.0-alpha.11":"2021-02-03T02:24:16.268Z","3.13.0":"2021-02-25T23:43:32.584Z","3.13.1":"2021-06-15T23:48:46.464Z","4.0.0-alpha.13":"2021-09-23T23:32:10.040Z","4.0.0-alpha.15":"2021-10-06T17:03:53.325Z","4.0.0-alpha.16":"2021-10-06T17:05:08.632Z","4.0.0-alpha.17":"2021-10-06T18:47:31.443Z","4.0.0-alpha.18":"2021-10-06T23:40:33.696Z","4.0.0-alpha.19":"2021-10-06T23:47:29.374Z","4.0.0-alpha.20":"2021-10-06T23:54:56.835Z","4.0.0-alpha.21":"2021-10-08T17:06:00.494Z","4.0.0-alpha.22":"2021-10-11T20:39:24.997Z","4.0.0-alpha.23":"2021-10-11T21:07:22.326Z","4.0.0-alpha.24":"2021-10-11T21:46:54.010Z","4.0.0-alpha.25":"2021-10-12T01:20:42.128Z","4.0.0-alpha.26":"2021-10-12T01:34:31.755Z","4.0.0-alpha.27":"2021-10-13T19:06:30.743Z","4.0.0-alpha.28":"2021-10-13T22:18:22.190Z","4.0.0-alpha.29":"2021-10-15T17:35:53.976Z","4.0.0-alpha.30":"2021-10-15T18:51:01.086Z","4.0.0-alpha.31":"2021-10-15T18:55:23.669Z","4.0.0-alpha.32":"2021-10-15T19:39:46.259Z","4.0.0-alpha.33":"2021-10-15T19:43:05.883Z","4.0.0-alpha.34":"2021-10-15T19:53:11.759Z","4.0.0-alpha.35":"2021-10-15T20:00:15.314Z","4.0.0-alpha.36":"2021-10-15T20:03:41.926Z","4.0.0-alpha.37":"2021-10-15T20:06:29.584Z","4.0.0-alpha.38":"2021-10-15T20:46:07.318Z","4.0.0-alpha.39":"2021-10-15T21:10:04.143Z","4.0.0-alpha.40":"2021-10-15T21:19:59.251Z","4.0.0-alpha.41":"2021-10-18T18:34:25.804Z","4.0.0-alpha.42":"2021-10-18T19:40:30.883Z","4.0.0-alpha.43":"2021-10-18T19:44:46.552Z","4.0.0-alpha.44":"2021-11-02T17:39:32.513Z","4.0.0-alpha.45":"2021-11-02T18:15:52.476Z","3.14.0":"2022-03-18T00:18:39.002Z","3.14.1":"2022-03-18T00:48:19.746Z"},"bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","homepage":"https://github.com/AgeOfLearning/aofl#readme","keywords":["aofljs","@aofl/api-request","api request","api","cache response"],"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"description":"A module for simplifying api calls","contributors":[{"name":"Daniel Belisle","email":"daniel.belisle@aofl.com"},{"name":"Micah Blu","email":"micah.blu@aofl.com"}],"maintainers":[{"email":"alexdinari@me.com","name":"alexdinari"},{"email":"lorenzo.battigelli@aofl.com","name":"lorenzo.battigelli"},{"email":"alex.dinari@aofl.com","name":"alex.dinari"},{"email":"it@aofl.com","name":"ageoflearning"},{"email":"jie.zhang@aofl.com","name":"jiezhangaofl"}],"readme":"# @aofl/api-request\n\nA module for making api calls easier. Key features include caching responses and request/response formatters.\n\nCaching is implemented using @aofl/cache-manager and uses MemoryCache. @aofl/api-request caches the promises created by fetch api.\n\n\nRequest/response formatting refers to constructing a request payload and parsing the response payload. A formatter object should implement `pack()` and `unpack()` properties. `pack()` is to construct the request payload and `unpack()` is used to parse the response. Any number of formatters can be added to `apiRequestInstance` using the `addFromatter()` method. E.g. `GetFormatter`, `PostFormatter`, `CorsFormatter`, `FileUploadFormatter`, `GoogleMapsFormatter`, ....\n\n[Api Documentation](https://ageoflearning.github.io/aofl/v3.x/api-docs/module-@aofl_api-request.html)\n\n## Examples\n* [Basic Example](https://codesandbox.io/s/github/AgeOfLearning/aofl/tree/v3.0.0/aofl-js-packages/api-request/examples/simple)\n\n## Installation\n```bash\nnpm i -S @aofl/api-request\n```\n\n## Usage\n```javascript\nimport {ApiRequest} from '@aofl/api-request';\n\nclass PostFormatter {\n  static pack(payload) {\n    const headers = new Headers();\n    const body = new FormData();\n\n    if (typeof payload !== 'undefined') {\n      body.append('arguments', JSON.stringify(payload));\n    }\n\n    return {\n      method: 'POST',\n      headers,\n      body,\n      mode: 'cors',\n      credentials: 'include'\n    };\n  }\n\n  static unpack(response) {\n    return response.json()\n    .then((data) => {\n      if (data.status !== 'success') {\n        return Promise.reject(data);\n      }\n      return data;\n    });\n  }\n}\n\nconst apiRequestInstance = new ApiRequest();\napiRequestInstance.addFormatter('post', PostFormatter);\n\napiRequestInstance.request('https://example.org/', {}, 'post', true, 'sample-namespace')\n.then((jsonResponse) => {\n})\n.catch((jsonResponse) => {\n});\n```\n","readmeFilename":"README.md"}