{"_id":"@fmal/http-service","_rev":"38-9e59b0cc3227cefbc25fbd1fc30a0f08","name":"@fmal/http-service","dist-tags":{"latest":"3.0.5","next":"3.0.5-1602948849571"},"versions":{"1.0.0":{"name":"@fmal/http-service","version":"1.0.0","description":"A HTTP service - orignally @cerebral/http","main":"lib/index.js","module":"esm/index.js","types":"lib/index.d.ts","sideEffects":false,"repository":{"type":"git","url":"git+https://github.com/fmal/http-service.git"},"keywords":["cerebral","cerebraljs","http"],"author":{"name":"Christian Alfoni","email":"christianalfoni@gmail.com"},"contributors":[{"name":"Filip Malinowski","email":"filip@fmal.me"}],"license":"MIT","bugs":{"url":"https://github.com/fmal/http-service/issues"},"homepage":"https://github.com/fmal/http-service#readme","devDependencies":{"@babel/cli":"7.1.5","@babel/core":"7.1.5","@babel/preset-env":"7.1.5","@commitlint/cli":"7.2.1","@commitlint/config-conventional":"7.1.2","babel-core":"7.0.0-bridge.0","babel-jest":"23.6.0","babel-plugin-add-module-exports":"1.0.0","cerebral":"5.0.2","cross-env":"5.2.0","eslint":"5.9.0","eslint-config-fmal":"5.0.0","eslint-plugin-jest":"22.0.0","husky":"1.1.3","jest":"23.6.0","lint-staged":"8.0.4","npm-check":"5.9.0","npm-run-all":"4.1.3","prettier":"1.15.2","standard-version":"4.4.0","xhr-mock":"2.4.1"},"scripts":{"clean":"rimraf lib esm","build:esm":"cross-env BABEL_ENV=esm babel src/ -d esm/ --copy-files","build:cjs":"cross-env BABEL_ENV=cjs babel src/ -d lib/ --copy-files","prebuild":"npm run clean","build":"cross-env NODE_ENV=production run-p build:*","test":"jest","test:coverage":"npm test -- --coverage","test:ci":"npm test -- --runInBand --ci","lint":"eslint . --ignore-path .gitignore --cache --fix","format":"prettier --write \"**/*.{md,json,d.ts,yaml}\"","prerelease":"npm test","release":"standard-version","release:dry":"standard-version --dry-run","prepublishOnly":"npm run build","deps":"npm-check -u"},"lint-staged":{"*.js":["eslint --fix","git add"],"*.{md,json,d.ts,yaml}":["prettier --write","git add"]},"husky":{"hooks":{"pre-commit":"lint-staged","pre-push":"npm test","commit-msg":"commitlint -E HUSKY_GIT_PARAMS"}},"commitlint":{"extends":["@commitlint/config-conventional"]},"gitHead":"6fca0bedfe5dc827644a199a70972d9fe9b9dd4c","_id":"@fmal/http-service@1.0.0","_npmVersion":"6.4.1","_nodeVersion":"10.13.0","_npmUser":{"name":"fmal","email":"fmalinowski@gmail.com"},"dist":{"integrity":"sha512-5BDFz8Ic7ApwCx0reIIy9QWlB6hr/zUshzAw+Wmno47Gq6Cmqz7xiJKBPY1BqLM79Szy+DlHYkw//qiUDT4QUQ==","shasum":"5834bedb704cf303785d63cdd7db3ffa415645ac","tarball":"https://registry.npmjs.org/@fmal/http-service/-/http-service-1.0.0.tgz","fileCount":60,"unpackedSize":118431,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb6fy/CRA9TVsSAnZWagAA7TIP/2YqziVBqDZZg0BQZoWj\nFel7Dz51X2GCC1MtcNWMrwBwf5sUmZjv+Tx2BD8WlISNcYUJFfs4l07AcGR1\njGhIIYEIFKgbNdBoQsHDMdrzog/T0ekMgHXqRyVgb6Hnf+vENPX6K7aIGFUw\n9ug/sYTDLfYaA85x1mTffprgqOYjj559qL5wG4GjY1QgwG90PgoqLsFrBKqi\nxI1GtwsAejWoZhf1SxCCVygfd1l6V99snNWy5RnuWCk/PrAtp3J/1Tv7Yvyj\nsCZTKWoTyVJ/crvriCw2xBrn4x/BDziWA69MjLl5GbZBSj60th7+z5L2uDJa\n7Arn8fFKFghC9dZjCc48RkaGroacKZE58hyZxCgp4TkI6FJpHhYYKAM2nRaU\nvx3//yyylSiZ1XlsiyhSjuAsFFnrVi/Ou/ajj2wwwAzz7xH/KHGjxuQgJwKO\nIlL6GIMyHUtgLRzYYllJixgI+FFpgWFZYZbzPRzpozLrFllP14QiWfqP84w9\n7rInKB7haIgNxFCDyZHwg8AWmpGMRc3uqiGu5esdlwO6HZ2chN+4KiCkQ+PQ\nz4lAq3eJBFk8sMCCfmXHBg9fNjMdPrL0ks+btYgnkaM7SyoI/Q0lTSzvyTD1\nLW9sWxGRB8yXSnw4BvjzMx7oD3OjjIydBlCdda7nzMxpLil62L8oQ0WP9csl\nNVNs\r\n=EOwe\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEQHReZqYKXpXSo8E9U7fo625bXJTGDAYhHsu1WzjJxXAiEA3KQr2rW50imSxcBtGr/JVr2JAYeUOrG7DF9BUp5GIpE="}]},"maintainers":[{"name":"fmal","email":"fmalinowski@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/http-service_1.0.0_1542061246611_0.2749849332149614"},"_hasShrinkwrap":false},"1.0.1":{"name":"@fmal/http-service","version":"1.0.1","description":"A HTTP service - orignally @cerebral/http","main":"lib/index.js","module":"esm/index.js","types":"lib/index.d.ts","sideEffects":false,"repository":{"type":"git","url":"git+https://github.com/fmal/http-service.git"},"keywords":["cerebral","cerebraljs","http"],"author":{"name":"Christian Alfoni","email":"christianalfoni@gmail.com"},"contributors":[{"name":"Filip Malinowski","email":"filip@fmal.me"}],"license":"MIT","bugs":{"url":"https://github.com/fmal/http-service/issues"},"homepage":"https://github.com/fmal/http-service#readme","devDependencies":{"@babel/cli":"7.1.5","@babel/core":"7.1.5","@babel/preset-env":"7.1.5","@commitlint/cli":"7.2.1","@commitlint/config-conventional":"7.1.2","babel-core":"7.0.0-bridge.0","babel-jest":"23.6.0","babel-plugin-add-module-exports":"1.0.0","cerebral":"5.0.2","cross-env":"5.2.0","eslint":"5.9.0","eslint-config-fmal":"5.0.0","eslint-plugin-jest":"22.0.0","husky":"1.1.3","jest":"23.6.0","lint-staged":"8.0.4","npm-check":"5.9.0","npm-run-all":"4.1.3","prettier":"1.15.2","standard-version":"4.4.0","xhr-mock":"2.4.1"},"scripts":{"clean":"rimraf lib esm","build:esm":"cross-env BABEL_ENV=esm babel src/ -d esm/ --copy-files","build:cjs":"cross-env BABEL_ENV=cjs babel src/ -d lib/ --copy-files","prebuild":"npm run clean","build":"cross-env NODE_ENV=production run-p build:*","test":"jest","test:coverage":"npm test -- --coverage","test:ci":"npm test -- --runInBand --ci","lint":"eslint . --ignore-path .gitignore --cache --fix","format":"prettier --write \"**/*.{md,json,d.ts,yaml}\"","prerelease":"npm test","release":"standard-version","release:dry":"standard-version --dry-run","prepublishOnly":"npm run build","deps":"npm-check -u"},"lint-staged":{"*.js":["eslint --fix","git add"],"*.{md,json,d.ts,yaml}":["prettier --write","git add"]},"husky":{"hooks":{"pre-commit":"lint-staged","pre-push":"npm test","commit-msg":"commitlint -E HUSKY_GIT_PARAMS"}},"commitlint":{"extends":["@commitlint/config-conventional"]},"gitHead":"bf25c3012c4ab6de0db944b0ffeb08caf1a3e049","_id":"@fmal/http-service@1.0.1","_npmVersion":"5.6.0","_nodeVersion":"9.11.2","_npmUser":{"name":"fmal","email":"fmalinowski@gmail.com"},"dist":{"integrity":"sha512-vnZt8ptucAQD9pSZbKoeLUPSeR0h5kkdKKCyltSq9XlU8yzvKY4Jo8QcVd0Ry3Z9nE98yIfNSxIsXYjXicdglQ==","shasum":"baed8fc84b5029f2a1c46e398ca296f00f15a845","tarball":"https://registry.npmjs.org/@fmal/http-service/-/http-service-1.0.1.tgz","fileCount":53,"unpackedSize":83209,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb7J90CRA9TVsSAnZWagAAHcUP/jwzRjwz2lkp/TNSKq7p\nBOWozD3mjUI/MiJ1gUITphghJj7JkMEflwPjZ2BG6N+yTOV+IiaLDWnZubto\n/wL6yzctRIgpMPYPx9LE8CWcWusebrkfP72sDLPdtnQXD0Sm05sV2r6dN9wf\nEE4MstG0W4HFH/GbiSyS/VxveI+c5+SEzVBvYIWcqMfma/yO3Mrz5oyzV0oh\nYiy+5TEwtzT0bOqMzpAN/9zYGVxG9P0UKXH4QJwg3yFfm4jySO5gNFXs/6PM\nbLTddWicU7Wgx5xwQEa1yAofZ9sTVe2OkQiu7vr2I3u3Feb0/qghEFBGTkDO\nN7vF1tV4ZcE1G3qGSks5tEMtIL3YaVOlEo6cN8iT7EX2Jg3yT2gml5aw9ZFE\ngbkvalRybWS+bztozK7LhpkiDKkx5qFBE71Xw0HXOtt8jK6EU4tjM5QhANfn\nwm7P+d2HGlyXRvwYRHpc/Ujjj7D4/L3+eMjvXHuQ6xCyKnYEyU9V7Z1TPoW/\nD8sDmw0UdHgxFgc7WJZ7e7xu+oX5wOLfQeYyEUAoAZTVCJF2VHbqV3E7vF41\nYQ4jWID6UYcmUDaJjmsrGIOkf6wvE8D5UkGrFyzmrQlAYhxLBOXb2qTfUMmV\n2GatHuBU/jgsHVL9O9CI8JamMOhJFPkHngn3BaQ3XQDvgLNMIGCyTc7J3VSl\nm/GD\r\n=kcFw\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIG9oaWUBEw+7VGaaig1UzS3czKtPn7XP2DnwiFzBLOwMAiEAtmo8CXqlVYQAQNxd42yAdMPnEPwHbw9c24I2nfdrWnw="}]},"maintainers":[{"name":"fmal","email":"fmalinowski@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/http-service_1.0.1_1542233971759_0.9995200691210366"},"_hasShrinkwrap":false},"2.0.1":{"name":"@fmal/http-service","version":"2.0.1","description":"A HTTP service - orignally @cerebral/http","license":"UNLICENSED","keywords":["cerebral","cerebraljs","http"],"author":{"name":"Christian Alfoni","email":"christianalfoni@gmail.com"},"contributors":[{"name":"Filip Malinowski","email":"filip@fmal.me"}],"bugs":{"url":"https://github.com/fmal/monorepo/issues"},"repository":{"type":"git","url":"git+https://github.com/fmal/monorepo.git","directory":"packages/@fmal/http-service"},"publishConfig":{"access":"public"},"types":"dist/ts","main":"dist/cjs/index.js","module":"dist/es/index.js","sideEffects":false,"scripts":{"test":"jest","test:coverage":"npm test -- --coverage","lint":"eslint . --cache --fix --ext \".js,.ts\" --ignore-path ../../../.prettierignore","clean":"rimraf dist coverage ../../node_modules/@fmal/http-service","_babel":"babel src -x \".js,.ts\" --root-mode upward --copy-files","prebuild":"npm run clean","postbuild":"cpy package.json ../../node_modules/@fmal/http-service && cpy factories/package.json ../../node_modules/@fmal/http-service/factories","build:cjs":"cross-env BABEL_ENV=cjs npm run _babel -- -d ../../node_modules/@fmal/http-service/dist/cjs","build:es":"cross-env BABEL_ENV=es npm run _babel -- -d ../../node_modules/@fmal/http-service/dist/es","build":"cross-env NODE_ENV=production run-p build:*","prepublishOnly":"rimraf dist && cpy ../../node_modules/@fmal/http-service/dist/**/* dist"},"devDependencies":{"@babel/cli":"7.6.4","cerebral":"5.1.1","cpy-cli":"2.0.0","cross-env":"6.0.3","eslint":"6.5.1","jest":"24.9.0","npm-run-all":"4.1.5","rimraf":"3.0.0","xhr-mock":"2.5.0"},"homepage":"https://github.com/fmal/monorepo#readme","_id":"@fmal/http-service@2.0.1","_nodeVersion":"10.15.1","_npmVersion":"6.11.3","dist":{"integrity":"sha512-pu1mP5628imWgqY9pMobFKKuptAIAg089BjKQ0gcN46VXWdJmK4yJcqL47pTL/t5t2g4ytjRAUxkUupSHy3wgQ==","shasum":"b8de3295ffb001b16303fcdc8f6a56918d3a52a3","tarball":"https://registry.npmjs.org/@fmal/http-service/-/http-service-2.0.1.tgz","fileCount":36,"unpackedSize":72220,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdoIyCCRA9TVsSAnZWagAAviIP/2IhuTWtf7JD4AZ44hzA\n8X4OUhLE9a980d7UmhLrIKuGMngXdZX+PjGD3/1EPWZWnhdPaBShIW5z64m8\n6LykR2kbjQ2YngEjJ+s7pDhUbM1+IZrzP2WK9A8QL2m6NO0oThr+rUX95O3Q\nhbVyjdAl3OsjR0y8RFniRvWwAeB+XgSerQtVlBy5mNgf5MB8D5e1oEVq4RZC\nw38GXpx/9L9N1NUqpitLbAjO+Z+gJ8UrFVt4ymOxoSdEIStzSTMjbMnRAF2v\nF445xf8SjTBqd2mHZLTsUqgf59cZdFtiK0yxob5jqN/moooodNm07smLNeBl\nMlfA9zmB7SuOzdC1f4ZXh1lHGRP0DqhHRjVL1rKShtVTkaoObnOJl6lsTQ8B\nTTEDqncuwwOpz60Uw+wD7g8g0YP1Yk6fAG36TM8iLqnDyKWF5ma8PNCa8VY1\nCedHl0R5jGYlWTQc8QUoJIKtwbvvQCyJg9U2GG61UU2KYBukyBVc/uwWYpq3\nfzroT9M/dAsB6LVu3OM0cYlf52elJvg3ueDIy87QCimjKvITUSY1GlicaJYp\n6t3DNujXh+W+dU5U2JhLzuCWOoPT5FghF3N86EWXm1iN6gCBX7vjI1pGXF06\nEKE6y4/zUR8js/wV7quKErJBrpG8WjQm6XPZjJigjiyj+Cfoak6DwqJWPhvB\n9hB+\r\n=5IZ2\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAtf0M5FSXs4cUPlm2F8jY98GX73eOYKITLLdWO6oR6PAiBIY3+pjgPssCEuXLr0I6O4KWSAvwsmb0lW43JdXKr6pQ=="}]},"maintainers":[{"name":"fmal","email":"fmalinowski@gmail.com"}],"_npmUser":{"name":"fmal","email":"fmalinowski@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/http-service_2.0.1_1570802817896_0.3582758421058321"},"_hasShrinkwrap":false},"3.0.0":{"name":"@fmal/http-service","version":"3.0.0","description":"A HTTP service - orignally @cerebral/http","license":"UNLICENSED","keywords":["cerebral","cerebraljs","http"],"author":{"name":"Christian Alfoni","email":"christianalfoni@gmail.com"},"contributors":[{"name":"Filip Malinowski","email":"filip@fmal.me"}],"bugs":{"url":"https://github.com/fmal/monorepo/issues"},"repository":{"type":"git","url":"git+https://github.com/fmal/monorepo.git","directory":"packages/@fmal/http-service"},"publishConfig":{"access":"public"},"types":"dist/ts","main":"dist/cjs/index.js","module":"dist/es/index.js","sideEffects":false,"scripts":{"test":"jest","test:coverage":"npm test -- --coverage","lint":"eslint . --cache --fix --ext \".js,.ts\" --ignore-path ../../../.prettierignore","clean":"rimraf dist coverage ../../node_modules/@fmal/http-service","_babel":"babel src -x \".js,.ts\" --root-mode upward --copy-files","prebuild":"npm run clean","postbuild":"cpy package.json ../../node_modules/@fmal/http-service && cpy factories/package.json ../../node_modules/@fmal/http-service/factories","build:cjs":"cross-env BABEL_ENV=cjs npm run _babel -- -d ../../node_modules/@fmal/http-service/dist/cjs","build:es":"cross-env BABEL_ENV=es npm run _babel -- -d ../../node_modules/@fmal/http-service/dist/es","build":"cross-env NODE_ENV=production run-p build:*","prepublishOnly":"rimraf dist && cpy ../../node_modules/@fmal/http-service/dist/**/* dist"},"devDependencies":{"@babel/cli":"7.6.4","cerebral":"5.1.1","cpy-cli":"2.0.0","cross-env":"6.0.3","eslint":"6.5.1","jest":"24.9.0","npm-run-all":"4.1.5","rimraf":"3.0.0","xhr-mock":"2.5.0"},"homepage":"https://github.com/fmal/monorepo#readme","_id":"@fmal/http-service@3.0.0","_nodeVersion":"10.16.3","_npmVersion":"6.9.0","dist":{"integrity":"sha512-+4zxtNr5ouAiroQXwYRsExZq43XKsbdxtGS8OhYzu7h7XdPFOzx33EoViKYw3KDdKP5Yp1j4P7EkTKDJwE6XUg==","shasum":"a03765da6e8b691e30ba67b882e4184fd2b86a8b","tarball":"https://registry.npmjs.org/@fmal/http-service/-/http-service-3.0.0.tgz","fileCount":35,"unpackedSize":66071,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdoI19CRA9TVsSAnZWagAAebAP/22eIZrbOTOBv0uy3xsc\nL21KYctlccGZ0JfBWe+S3wr8ujnQxM1i+2bC5V++UXmAoPctKGCt8mRhGxnP\nD+H9Srp04LRk0CdEWXnVwaXgS/6J1QQHWKkHiIvd60gC5YZPShqlLHFroZ74\n6r3x/Rc3MVLKk2jL+xRC7eSw1l4VSNi0qzIlbZrHBgK6hgtVpvdblEN1AHNl\nIHNLs1UZ3a+p9vSrEDb5kah+syYj5ijdg5jWbRF42IFcplA+2gi3QbvdZ5KD\ncWRlhH5FpX7R+23HELNtVJRmPncM7eYo1qQSgLKE25Z2o7tFCMdEy5fmwXsM\nMsKwIejr9kXtGyEw7thTOQQ07iu5O+32OTwhIIK6fWSeM4Sy/ONsklj3TeBS\nP0ES5WTGXwJaU/zxQM6hcIXFbYe27Ua4B+77v1DSPDURqVhkzGVJ6pEH8OIg\nmLRkxbfgL1qSrmEn3MNKIJJwuKdN5VcFdbecuiTgvgwxB5KJcYKUWkwIHqpi\nhfR/lNcycasYqOBuaT3xqdib27IHsUfet/nIGsOam9WZPEMjY47Ql/mL63Rx\nxyQnKSgYVrhln2WV+6dFXfMCMFqE29KR2XsyFaD5yx8OtwemGX0+JIZkx63R\nLCfQjUEtOxvz33T/bg90RRmeG5t10l8jy19ggZHEqj/dW1HNItsypfobLTEy\nxfrN\r\n=szo6\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBONirpUMusVEYOYYMSk0D4Nju448pVK7LMDlXlIBjZHAiEAmrmoHU4Ghfwa18Iv3x0uPdNyhQnb8WJWx8xOLZ6Ms7Q="}]},"maintainers":[{"name":"fmal","email":"fmalinowski@gmail.com"}],"_npmUser":{"name":"fmal","email":"fmalinowski@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/http-service_3.0.0_1570803068736_0.7487597081713906"},"_hasShrinkwrap":false},"3.0.1":{"name":"@fmal/http-service","version":"3.0.1","description":"A HTTP service - orignally @cerebral/http","license":"UNLICENSED","keywords":["cerebral","cerebraljs","http"],"author":{"name":"Christian Alfoni","email":"christianalfoni@gmail.com"},"contributors":[{"name":"Filip Malinowski","email":"filip@fmal.me"}],"bugs":{"url":"https://github.com/fmal/monorepo/issues"},"repository":{"type":"git","url":"git+https://github.com/fmal/monorepo.git","directory":"packages/@fmal/http-service"},"publishConfig":{"access":"public"},"types":"dist/ts","main":"dist/cjs/index.js","module":"dist/es/index.js","sideEffects":false,"scripts":{"test":"jest","test:coverage":"npm test -- --coverage","lint":"eslint . --cache --fix --ext \".js,.ts\" --ignore-path ../../../.prettierignore","clean":"rimraf dist coverage ../../node_modules/@fmal/http-service","_babel":"babel src -x \".js,.ts\" --root-mode upward --copy-files","prebuild":"npm run clean","postbuild":"cpy package.json ../../node_modules/@fmal/http-service && cpy factories/package.json ../../node_modules/@fmal/http-service/factories","build:cjs":"cross-env BABEL_ENV=cjs npm run _babel -- -d ../../node_modules/@fmal/http-service/dist/cjs","build:es":"cross-env BABEL_ENV=es npm run _babel -- -d ../../node_modules/@fmal/http-service/dist/es","build":"cross-env NODE_ENV=production run-p build:*","prepublishOnly":"rimraf dist && cpy '@fmal/http-service/dist/**/*' .. --cwd=../../node_modules --parents"},"devDependencies":{"@babel/cli":"7.6.4","cerebral":"5.1.1","cpy-cli":"2.0.0","cross-env":"6.0.3","eslint":"6.5.1","jest":"24.9.0","npm-run-all":"4.1.5","rimraf":"3.0.0","xhr-mock":"2.5.0"},"homepage":"https://github.com/fmal/monorepo#readme","_id":"@fmal/http-service@3.0.1","_nodeVersion":"10.16.3","_npmVersion":"6.9.0","dist":{"integrity":"sha512-B6NZ4xBLnOILSzDvb9vXPUpLNoOgAOaOq4ajfLixnDYCi0+XJMFqYE5zC+yPGKFNVlzw8et8qKytq6fdeVJV9w==","shasum":"72175a9dc753087c98b39ebdc6b3b3df58f6b282","tarball":"https://registry.npmjs.org/@fmal/http-service/-/http-service-3.0.1.tgz","fileCount":51,"unpackedSize":72683,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdoYAuCRA9TVsSAnZWagAAFocP/AyT9x2MVfxAVCtghErF\nxBA51g46QLfVkayMUrFyv7yQYTefuSCizHnCJ8d/xSr/wNa0NOCA2MYYq82T\nhiU4JqeQiajEnbfV7pWsaT3EjuGW8Mk+wbOseR3q6vwiOVRuE3/nKd6DHUOL\ntMSV4hLTW1zz9LhXboJORMBME3Wb1lwbuHDtSonKVjXVFIVuLnzartB5o34r\nniMTtJ5319Ej32Pm73HcbKebadaF47MR9/7QMO9hgInylFCxN0sjmEL0MjgS\nWwBWN15tpOAyfZcNLZDZgIoupi2oMQdOIBqKbI49lEK0htlrMv2b7LivFfaF\n89qBRz3Iru8C2xmZ1CU/VHD2SU0ii9D3BKCbDHb8tmmIPJudsVlspAjbc5a2\nGbugCK7Ve//yUh7UHsENCv8ZfgEH6bTPq0pZ3n9Inpk2LRvf8x2KEJssyvhi\nWM+d/xma3OtVYt49bQKWeUK9gFrdK1bEQAiKV4N/NZF3dLbpGhKSkG/Z5jGb\nyaLKsJHTi7kbKyF4Ps4TGU+mSZd/boyYp1VDQTGJQ7bprzddURrsLZxuD470\nIXaCFTxPZsuRybbSQENRqlgbGcwdupQo827MuCREULaHBlN76bo9jj0JRgde\n5XOFpXPvRNyAtzhjfFz9Bklh9RRBxIJZMTtO9819LrQddO8tdalg3by+VHo2\n7UBn\r\n=cK8U\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDR0cxc0xVJdd/27B/l6NTum35+W5RLUVqsY+UJA+SQhwIhAOVsTkMLgkeU+K5JA5YjG9imR1zB4TFt5qYqabPBwmO2"}]},"maintainers":[{"name":"fmal","email":"fmalinowski@gmail.com"}],"_npmUser":{"name":"fmal","email":"fmalinowski@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/http-service_3.0.1_1570865197737_0.25640204570826164"},"_hasShrinkwrap":false},"3.0.2":{"name":"@fmal/http-service","version":"3.0.2","description":"A HTTP service - orignally @cerebral/http","license":"UNLICENSED","keywords":["cerebral","cerebraljs","http"],"author":{"name":"Christian Alfoni","email":"christianalfoni@gmail.com"},"contributors":[{"name":"Filip Malinowski","email":"filip@fmal.me"}],"bugs":{"url":"https://github.com/fmal/monorepo/issues"},"repository":{"type":"git","url":"git+https://github.com/fmal/monorepo.git","directory":"packages/@fmal/http-service"},"publishConfig":{"access":"public"},"types":"dist/ts","main":"dist/cjs/index.js","module":"dist/es/index.js","sideEffects":false,"scripts":{"test":"jest","test:coverage":"npm test -- --coverage","lint":"eslint . --cache --fix --ext \".js,.ts\" --ignore-path ../../../.prettierignore","clean":"rimraf dist coverage ../../node_modules/@fmal/http-service","_babel":"babel src -x \".js,.ts\" --root-mode upward","prebuild":"npm run clean","copy:pkg":"cpy package.json ../../node_modules/@fmal/http-service && cpy factories/package.json ../../node_modules/@fmal/http-service/factories","copy:declarations":"cpy src/index.d.ts ../../node_modules/@fmal/http-service/dist/ts && cpy src/factories/index.d.ts ../../node_modules/@fmal/http-service/dist/ts/factories","postbuild":"run-p copy:*","build:cjs":"cross-env BABEL_ENV=cjs npm run _babel -- -d ../../node_modules/@fmal/http-service/dist/cjs","build:es":"cross-env BABEL_ENV=es npm run _babel -- -d ../../node_modules/@fmal/http-service/dist/es","build":"cross-env NODE_ENV=production run-p build:*","prepublishOnly":"rimraf dist && cpy \"@fmal/http-service/dist/**/*\" .. --cwd=../../node_modules --parents"},"devDependencies":{"@babel/cli":"7.6.4","cerebral":"5.2.0","cpy-cli":"2.0.0","cross-env":"6.0.3","eslint":"6.5.1","jest":"24.9.0","npm-run-all":"4.1.5","rimraf":"3.0.0","xhr-mock":"2.5.0"},"homepage":"https://github.com/fmal/monorepo#readme","_id":"@fmal/http-service@3.0.2","_nodeVersion":"10.16.3","_npmVersion":"6.9.0","dist":{"integrity":"sha512-dCeSxoDFK/71refTNRA+VZTNMotK4JwPcZq06OlSFoglbsu9cfPTszjm8PR2LzOovdrYtzd/8fRGIejNGLadoQ==","shasum":"4a4a67e0295b4a810aefd8848c76ab30c184436a","tarball":"https://registry.npmjs.org/@fmal/http-service/-/http-service-3.0.2.tgz","fileCount":53,"unpackedSize":76238,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdoY3iCRA9TVsSAnZWagAAnAAQAKHzcb/S/dB3X9xczOlV\nboG5SSxUe2aDf/lywbLPIthspoBPSgpq7/o34PsJmo1vwjoXuknNX/ELmY/T\nFeXxpgVyeSDFMxN8Dc2dk/zxcR0T7UCbFZsUjReSv5nAhe3X1ViyLYirqx4L\n3LrcJbiq5NFuogbWYlYQNn12bpkWEttCYQ9AYv5/Xu4ZkWRWQdD++tZLF7mh\ngaX338L12LqHzVYLM0E0jmCqcbAJpauWTuvOVThwjix2o/9FqM9bY52f8JRl\n8NQHcp85hWulhyP3f29l+oYxk9OGKK5xTJWMRq3ySeaRZrqfIa0VLRnyOt5T\nXcKhR9bUBP2lD3sOUgk2heOsNGV7Nq8sSRb9cQgb4wMIruqFSjrj6lMMg6IR\nlkZTVgbiaqL0J88zA/kSO1TkAlScuxiRvt/Qpx2EXjhGP+kqsWz1LuOkNPq1\nU6mKJJvevCfZVMzs8nowgS1kG+mdjlYgz+wLJQc1Rt5o81c7SAdLypJ5H9rI\nUqndbCaF2y5PXJUh+pzDKF6g19VT/9ATohCCn2ItBAvU8qjfqAzEiMQPn9T9\nQ7B4PJ0RPrfF5GPt5r/oQJgu5WhovO42uICxxJxnTUDLUyVWCxMXKIka5Aa7\nfuPndHp/O9DKXVWPRdgr/3JLLA/0F1sL9SE8zpRym7oDIZYnK95MWTUmINO+\nccIr\r\n=YjcC\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDBxD+rt54dgz/bhZdDCIBNNpitWVV66+coGxZbPrWL7QIhAI0JX0pzuU5t4sZ6fqV7tDhQl5EuYIGtT8255t4FyfkB"}]},"maintainers":[{"name":"fmal","email":"fmalinowski@gmail.com"}],"_npmUser":{"name":"fmal","email":"fmalinowski@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/http-service_3.0.2_1570868705588_0.7896228704254871"},"_hasShrinkwrap":false},"3.0.3-1571135102741":{"name":"@fmal/http-service","version":"3.0.3-1571135102741","description":"A HTTP service - orignally @cerebral/http","license":"UNLICENSED","keywords":["cerebral","cerebraljs","http"],"author":{"name":"Christian Alfoni","email":"christianalfoni@gmail.com"},"contributors":[{"name":"Filip Malinowski","email":"filip@fmal.me"}],"bugs":{"url":"https://github.com/fmal/monorepo/issues"},"repository":{"type":"git","url":"git+https://github.com/fmal/monorepo.git","directory":"packages/@fmal/http-service"},"publishConfig":{"access":"public"},"types":"dist/ts","main":"dist/cjs/index.js","module":"dist/es/index.js","sideEffects":false,"scripts":{"test":"jest","test:coverage":"npm test -- --coverage","lint":"eslint . --cache --fix --ext \".js,.ts\" --ignore-path ../../../.prettierignore","clean":"rimraf dist coverage ../../node_modules/@fmal/http-service","_babel":"babel src -x \".js,.ts\" --root-mode upward","prebuild":"npm run clean","copy:pkg":"cpy package.json ../../node_modules/@fmal/http-service && cpy factories/package.json ../../node_modules/@fmal/http-service/factories","copy:declarations":"cpy src/index.d.ts ../../node_modules/@fmal/http-service/dist/ts && cpy src/factories/index.d.ts ../../node_modules/@fmal/http-service/dist/ts/factories","postbuild":"run-p copy:*","build:cjs":"cross-env BABEL_ENV=cjs npm run _babel -- -d ../../node_modules/@fmal/http-service/dist/cjs","build:es":"cross-env BABEL_ENV=es npm run _babel -- -d ../../node_modules/@fmal/http-service/dist/es","build":"cross-env NODE_ENV=production run-p build:*","prepublishOnly":"rimraf dist && cpy \"@fmal/http-service/dist/**/*\" .. --cwd=../../node_modules --parents"},"devDependencies":{"@babel/cli":"7.6.4","cerebral":"5.2.0","cpy-cli":"2.0.0","cross-env":"6.0.3","eslint":"6.5.1","jest":"24.9.0","npm-run-all":"4.1.5","rimraf":"3.0.0","xhr-mock":"2.5.0"},"readme":"# @fmal/http-service\n\n[![npm](https://img.shields.io/npm/v/@fmal/http-service.svg?style=flat-square)](https://www.npmjs.com/package/@fmal/http-service)\n\nA HTTP service - originally `@cerebral/http`\n\n> Migrating from `@cerebral/http`? See the [migration guide](#migrating-from-cerebralhttp) at the bottom of this readme.\n\n## Install\n\n```\nnpm install @fmal/http-service\n```\n\n## Description\n\n`http-service` exposes the ability to do HTTP requests. It supports **cors** and file upload, with progress handling. It defaults to **json**, but you can configure it to whatever you want.\n\n`http-service` works great with [Cerebral](https://cerebraljs.com/) (with Cerebral-specific factories exposed) but the service itself (default export) does not depend on Cerebral, so you are free to use it in other contexts.\n\n```js\nimport { set } from 'cerebral/factories';\nimport { httpGet } from '@fmal/http-service/factories';\nimport { state, props, string } from 'cerebral';\n\nexport default [\n  httpGet(string`/items/${props`itemKey`}`),\n  set(state`app.currentItem`, props`result`)\n];\n```\n\nAll factories of HTTP service supports template tags.\n\n## Instantiate\n\n```js\nimport App, { Provider } from 'cerebral';\nimport HttpService from '@fmal/http-service';\n\nconst http = Provider(\n  HttpService({\n    // Prefix all requests with this url\n    baseUrl: 'https://api.github.com',\n\n    // Any default headers to pass on requests\n    headers: {\n      'Content-Type': 'application/json; charset=UTF-8',\n      Accept: 'application/json'\n    },\n\n    // When talking to cross origin (cors), pass cookies\n    // if set to true\n    withCredentials: false,\n\n    // Provide a global request timeout for all calls\n    // which can be overwritten for request by providing\n    // a different timeout when doing a request\n    // in actions or factories\n    timeout: 5000\n  })\n);\n\nconst app = App({\n  providers: { http }\n});\n```\n\nYou can update these default options in an action:\n\n```js\nfunction updateDefaultHttpOptions({ http }) {\n  http.updateOptions({\n    // Updated options\n  });\n}\n```\n\n## abort\n\nYou can abort any running request, causing the request to resolve as status code **0** and sets the type to **abort** on the error object.\n\n```js\nfunction searchItems({ props, path, http }) {\n  http.abort('/items*'); // regexp string\n  return http\n    .get(`/items?query=${props.query}`)\n    .then(path.success)\n    .catch(error => {\n      if (error.type === 'abort') {\n        return path.abort();\n      }\n\n      return path.error({ error });\n    });\n}\n\nexport default [\n  searchItems,\n  {\n    success: [],\n    error: [],\n    abort: []\n  }\n];\n```\n\n## cors\n\nCors has been turned into a \"black box\" by jQuery. Cors is actually a very simple concept, but due to a lot of confusion of \"Request not allowed\", **cors** has been an option to help out. In HttpService we try to give you the insight to understand how cors actually works.\n\nCors has nothing to do with the client. The only client configuration related to cors is the **withCredentials** option, which makes sure cookies are passed to the cross origin server. The only requirement for cors to work is that you pass the correct **Content-Type**. Now, this depends on the server in question. Some servers allows any content-type, others require a specific one. These are the typical ones:\n\n- text/plain\n- application/x-www-form-urlencoded\n- application/json; charset=UTF-8\n\nNote that this is only related to the **request**. If you want to define what you want as response, you set the **Accept** header, which is _application/json_ by default.\n\n## errors\n\n### HttpServiceError\n\n```js\nimport { HttpServiceError } from '@fmal/http-service';\n\n// Error structure\n{\n  name: 'HttpServiceError',\n  type: 'http | abort | timeout',\n  message: 'Some error message or responseText',\n  response: {\n    result: {}, // Parsed responseText\n    headers: {},\n    status: 200\n  },\n  stack: '...'\n}\n```\n\nThis error is available in the following scenarios:\n\n- Inside an action\n\n```js\nfunction someAction({ http }) {\n  return http.get('/something').catch(error => ...)\n}\n```\n\n- Going down an error path\n\n```js\n[\n  httpGet('/something'),\n  {\n    success: [],\n    error: [\n      // {error: ...}\n    ]\n  }\n];\n```\n\n- To module catch handlers\n\n```js\nconst errorCatched = [\n  // {error: ...}\n  displayError\n];\n\nconst module = {\n  catch: [[HttpServiceError, errorCatched]]\n};\n```\n\n## delete\n\n### action\n\n```js\nfunction someDeleteAction({ http }) {\n  const query = {};\n  const options = {};\n\n  return http\n    .delete('/items/1', query, options)\n    .then(response => {\n      return { response };\n    })\n    .catch(error => {\n      return { error };\n    });\n}\n```\n\n### factory\n\n```js\nimport { httpDelete } from '@fmal/http-service/factories';\nimport { state, string } from 'cerebral';\n\nexport default [\n  httpDelete(string`/items/${state`currentItemId`}`)\n  /*\n    PROPS: {\n      response: {...}\n    }\n  */\n];\n```\n\n### factory with paths\n\n```js\nimport { httpDelete } from '@cerebral/http/factories';\nimport { state, string } from 'cerebral';\n\nexport default [\n  httpDelete(string`/items/${state`currentItemId`}`),\n  {\n    success: [\n      /* PROPS: {response: {...}} */\n    ],\n    error: [\n      /* PROPS: {error: {...}} */\n    ],\n    abort: [\n      /* PROPS: {error: {...}} */\n    ],\n    timeout: [\n      /* PROPS: {error: {...}} */\n    ],\n\n    // Optionally any status code, ex. 404: []\n    '${STATUS_CODE}': [\n      /* PROPS: {response/error: {...}} */\n    ]\n  }\n];\n```\n\n## get\n\n### action\n\n```js\nfunction someGetAction({ http }) {\n  const query = {};\n  const options = {};\n\n  return http\n    .get('/items', query, options)\n    .then(response => {\n      return { someResponse: response };\n    })\n    .catch(error => {\n      return { someError: error };\n    });\n}\n```\n\n### factory\n\n```js\nimport { httpGet } from '@fmal/http-service/factories';\n\nexport default [\n  httpGet('/items')\n  /*\n    PROPS: {\n      response: {...}\n    }\n  */\n];\n```\n\nOn error this will throw to the signal or global catch handler.\n\n### factory with paths\n\n```js\nimport { httpGet } from '@fmal/http-service/factories';\n\nexport default [\n  httpGet('/items'),\n  {\n    success: [\n      /* PROPS: {response: {...}} */\n    ],\n    error: [\n      /* PROPS: {error: {...}} */\n    ],\n    abort: [\n      /* PROPS: {error: {...}} */\n    ],\n    timeout: [\n      /* PROPS: {error: {...}} */\n    ],\n\n    // Optionally any status code, ex. 404: []\n    '${STATUS_CODE}': [\n      /* PROPS: {response/error: {...}} */\n    ]\n  }\n];\n```\n\n## patch\n\n### action\n\n```js\nfunction somePatchAction({ http }) {\n  const data = {};\n  const options = {};\n\n  return http\n    .patch('/items/1', data, options)\n    .then(response => {\n      return { response };\n    })\n    .catch(error => {\n      return { error };\n    });\n}\n```\n\n### factory\n\n```js\nimport { httpPatch } from '@fmal/http-service/factories';\nimport { state, props, string } from 'cerebral';\n\nexport default [\n  httpPatch(string`/items/${props`itemId`}`, state`patchData`)\n  /*\n    PROPS: {\n      response: {...}\n    }\n  */\n];\n```\n\n### factory with paths\n\n```js\nimport { httpPatch } from '@fmal/http-service/factories';\nimport { state, props, string } from 'cerebral';\n\nexport default [\n  httpPatch(string`/items/${props`itemId`}`, state`patchData`),\n  {\n    success: [\n      /* PROPS: {response: {...}} */\n    ],\n    error: [\n      /* PROPS: {error: {...}} */\n    ],\n    abort: [\n      /* PROPS: {error: {...}} */\n    ],\n    timeout: [\n      /* PROPS: {error: {...}} */\n    ],\n\n    // Optionally any status code, ex. 404: []\n    '${STATUS_CODE}': [\n      /* PROPS: {response/error: {...}} */\n    ]\n  }\n];\n```\n\n## post\n\n### action\n\n```js\nfunction somePostAction({ http }) {\n  const data = {};\n  const options = {};\n\n  return http\n    .post('/items', data, options)\n    .then(response => {\n      return { response };\n    })\n    .catch(error => {\n      return { error };\n    });\n}\n```\n\n### factory\n\n```js\nimport { httpPost } from '@fmal/http-service/factories';\nimport { props } from 'cerebral';\n\nexport default [\n  httpPost('/items', {\n    title: props`itemTitle`,\n    foo: 'bar'\n  })\n  /*\n    PROPS: {\n      response: {...}\n    }\n  */\n];\n```\n\n### factory with paths\n\n```js\nimport { httpPost } from '@fmal/http-service/factories';\nimport { props } from 'cerebral';\n\nexport default [\n  httpPost('/items', {\n    title: props`itemTitle`,\n    foo: 'bar'\n  }),\n  {\n    success: [\n      /* PROPS: {response: {...}} */\n    ],\n    error: [\n      /* PROPS: {error: {...}} */\n    ],\n    abort: [\n      /* PROPS: {error: {...}} */\n    ],\n    timeout: [\n      /* PROPS: {error: {...}} */\n    ],\n\n    // Optionally any status code, ex. 404: []\n    '${STATUS_CODE}': [\n      /* PROPS: {response/error: {...}} */\n    ]\n  }\n];\n```\n\n## put\n\n### action\n\n```js\nfunction somePutAction({ http }) {\n  const data = {};\n  const options = {};\n\n  return http\n    .put('/items/1', data, options)\n    .then(response => {\n      return { response };\n    })\n    .catch(error => {\n      return { error };\n    });\n}\n```\n\n### factory\n\n```js\nimport { httpPut } from '@fmal/http-service/factories';\n\nexport default [\n  httpPut('/items', {\n    // data object\n  })\n  /*\n    PROPS: {\n      response: {...}\n    }\n  */\n];\n```\n\n### factory with paths\n\n```js\nimport { httpPut } from '@fmal/http-service/factories';\n\nexport default [\n  httpPut('/items', {\n    // data object\n  }),\n  {\n    success: [\n      /* PROPS: {response: {...}} */\n    ],\n    error: [\n      /* PROPS: {error: {...}} */\n    ],\n    abort: [\n      /* PROPS: {error: {...}} */\n    ],\n    timeout: [\n      /* PROPS: {error: {...}} */\n    ],\n\n    // Optionally any status code, ex. 404: []\n    '${STATUS_CODE}': [\n      /* PROPS: {response/error: {...}} */\n    ]\n  }\n];\n```\n\n## responses\n\nThere are two types of responses from the HTTP service. A **response** and an **error** of type _HttpServiceError_. A **response** will be received on status codes 200-299. Everything else is an **error**.\n\n### response\n\n```js\n{\n  result: 'the response body',\n  headers: {...},\n  status: 200\n}\n```\n\n### error\n\n```js\n{\n  name: 'HttpServiceError',\n  type: 'http | abort | timeout',\n  message: 'Some potential error message',\n  result: 'Message or response body',\n  status: 500,\n  headers: {},\n  stack: '...'\n}\n```\n\n## request\n\n```js\nfunction someGetAction ({http}) {\n  return http.request({\n    // Any http method\n    method: 'GET',\n\n    // Url you want to request to\n    url: '/items'\n\n    // Request body as object. Will automatically be stringified if json and\n    // urlEncoded if application/x-www-form-urlencoded\n    body: {},\n\n    // Query as object, will automatically be urlEncoded\n    query: {},\n\n    // If cross origin request, pass cookies\n    withCredentials: false,\n\n    // Any additional http headers, or overwrite default\n    headers: {},\n\n    // A function or signal path (foo.bar.requestProgressed) that\n    // triggers on request progress. Passes {progress: 45} etc.\n    onProgress: null\n  })\n}\n```\n\n## uploadFile\n\n### action\n\n```js\nfunction someDeleteAction({ http, props }) {\n  return http\n    .uploadFile('/upload', props.files, {\n      name: 'filename.png', // Default to \"files\"\n      data: {}, // Additional form data\n      headers: {},\n      onProgress: 'some.signal.path' // Upload progress\n    })\n    .then(response => {\n      return { response };\n    })\n    .catch(error => {\n      return { error };\n    });\n}\n```\n\n### factory\n\n```js\nimport { httpUploadFile } from '@fmal/http-service/factories';\nimport { state, props } from 'cerebral';\n\nexport default [\n  httpUploadFile('/uploads', props`file`, {\n    name: state`currentFileName`\n  }),\n  {\n    success: [\n      /* PROPS: {response: {...}} */\n    ],\n    error: [\n      /* PROPS: {error: {...}} */\n    ],\n    abort: [\n      /* PROPS: {error: {...}} */\n    ],\n\n    // Optionally any status code, ex. 404: []\n    '${STATUS_CODE}': [\n      /* PROPS: {response/error: {...}} */\n    ]\n  }\n];\n```\n\n### factory with paths\n\n```js\nimport { httpUploadFile } from '@fmal/http-service/factories';\nimport { state, props } from 'cerebral/tags';\n\nexport default [\n  httpUploadFile('/uploads', props`file`, {\n    name: state`currentFileName`\n  })\n  /*\n    PROPS: {\n      response: {...}\n    }\n  */\n];\n```\n\n## Migrating from @cerebral/http\n\nSince `http-service` does not depend on Cerebral it does not use `Provider`, but you can wrap `http-service` in `Provider` for the same effect:\n\n```diff\n-import { Controller, Module } from 'cerebral';\n-import HttpProvider from '@cerebral/http';\n+import App, { Provider } from 'cerebral';\n+import HttpService from '@fmal/http-service';\n\n-export default Controller(\n-  Module({\n-    providers: {\n-      http: HttpProvider({})\n-    }\n-  })\n-);\n+export default App({\n+  providers: {\n+    http: Provider(HttpService({}))\n+  }\n+});\n```\n\n`http-service` uses `HttpServiceError` error instead of `HttpProviderError`:\n\n```diff\n-import { HttpProviderError } from '@cerebral/http';\n+import { HttpServiceError } from '@fmal/http-service';\n```\n\n“operators” are changed with “factories”, to follow the naming introduced in Cerebral 5.0.\nFactories are exported under `@fmal/http-service/factories` and they are optional, meaning if you're\nusing `http-service` outside Cerebral app, you don't have to import (and thus bundle) them in your codebase.\n\n```diff\n-import { httpGet } from '@cerebral/http/operators';\n+import { httpGet } from '@fmal/http-service/factories';\n```\n","readmeFilename":"README.md","homepage":"https://github.com/fmal/monorepo#readme","_id":"@fmal/http-service@3.0.3-1571135102741","_nodeVersion":"10.16.3","_npmVersion":"6.9.0","dist":{"integrity":"sha512-A1N0sJRJdeGbXtDRDhKF7LE0B9xTxohnDLBXUKgd7SD+hWg2KhL32udVOKHRVmcs+vg+gvfU/ke++COklmb3TA==","shasum":"213751c6871bc1aaea0de7288e1947d46a3d4a2f","tarball":"https://registry.npmjs.org/@fmal/http-service/-/http-service-3.0.3-1571135102741.tgz","fileCount":53,"unpackedSize":76254,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdpZ6aCRA9TVsSAnZWagAA0nMP/R7vG8cb56fTIGhFT+bW\n8h53XKthWwZQ0U55hgLRuiSOmN48gVQIxnknGMNzZ0h3TcEQsLICojhpBVcx\niRzEbY1YKZl4tljNvyPNjaJIe1OYZAOfiCmf2ZKDLTLQKUNUMwKOEDksLd75\nxIQpYz1eFqNicJYhoXTzuiX2mSYB/b013aZASoOvXcjuVe959QZ6Sm0l+KBn\n64lO9WxHXJdWpNFxZKYA70etuhNiQPiZhp0aYdtPho9vz+arlETNXOMeQ/Ae\ne7ZPgtiTWLVPlIAxVEXt1f0fnhPnF2+icIioSgINrIyVv7OYrd11cNUV/XNN\nd55H8R1EgVOyWWT0PDYvuX9/l1vqnTjbWf+eKCdZNd16iGUIU6FHaqCOWugk\nrSX1gXDKai/Y2EDHLgYSfUtJfQrY3I6AjcLXfR7E5cGcZ21MVXc+hmXX8Qy2\nOdQ33movo8KpkSR0c8Ymxsw2N7WqJeU4PK+9JiEWh8CCh8pnibtug3oJmHSZ\nfvLyUBOp1NosV5CvFXofF2JC62blfvq3NCQcx6OD7lOVd9j+iDXPsk5bzbj2\ngLkA0K/yy5qdXJ2FWyzoYgHmO5zKjipkFz/h0IGMTglKZvAfVN8Y8Ke+l6YG\nByhgWdBhSWqt7bouP1qHpgY1KNxWVnNTKcKPEW3Mq1IkTzYpbwasFc+58Ygv\nnb8K\r\n=8IPI\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC2Pxu+ZGhvJByqbYY2h9lXyZN+tuxj0bQ0lr4TwMaJbQIgKtOmkG28rrX+z6YAPkTWoR3Nr17qoB87xMpW+cboU+w="}]},"maintainers":[{"name":"fmal","email":"fmalinowski@gmail.com"}],"_npmUser":{"name":"fmal","email":"fmalinowski@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/http-service_3.0.3-1571135102741_1571135130048_0.4186833921889368"},"_hasShrinkwrap":false},"3.0.3":{"name":"@fmal/http-service","version":"3.0.3","description":"A HTTP service - orignally @cerebral/http","license":"UNLICENSED","keywords":["cerebral","cerebraljs","http"],"author":{"name":"Christian Alfoni","email":"christianalfoni@gmail.com"},"contributors":[{"name":"Filip Malinowski","email":"filip@fmal.me"}],"bugs":{"url":"https://github.com/fmal/monorepo/issues"},"repository":{"type":"git","url":"git+https://github.com/fmal/monorepo.git","directory":"packages/@fmal/http-service"},"publishConfig":{"access":"public"},"types":"dist/ts","main":"dist/cjs/index.js","module":"dist/es/index.js","sideEffects":false,"scripts":{"test":"jest","test:coverage":"npm test -- --coverage","lint":"eslint . --cache --fix --ext \".js,.ts\" --ignore-path ../../../.prettierignore","clean":"rimraf dist coverage ../../node_modules/@fmal/http-service","_babel":"babel src -x \".js,.ts\" --root-mode upward","prebuild":"npm run clean","copy:pkg":"cpy package.json ../../node_modules/@fmal/http-service && cpy factories/package.json ../../node_modules/@fmal/http-service/factories","copy:declarations":"cpy src/index.d.ts ../../node_modules/@fmal/http-service/dist/ts && cpy src/factories/index.d.ts ../../node_modules/@fmal/http-service/dist/ts/factories","postbuild":"run-p copy:*","build:cjs":"cross-env BABEL_ENV=cjs npm run _babel -- -d ../../node_modules/@fmal/http-service/dist/cjs","build:es":"cross-env BABEL_ENV=es npm run _babel -- -d ../../node_modules/@fmal/http-service/dist/es","build":"cross-env NODE_ENV=production run-p build:*","prepublishOnly":"rimraf dist && cpy \"@fmal/http-service/dist/**/*\" .. --cwd=../../node_modules --parents"},"devDependencies":{"@babel/cli":"7.6.4","cerebral":"5.2.0","cpy-cli":"2.0.0","cross-env":"6.0.3","eslint":"6.5.1","jest":"24.9.0","npm-run-all":"4.1.5","rimraf":"3.0.0","xhr-mock":"2.5.0"},"homepage":"https://github.com/fmal/monorepo#readme","_id":"@fmal/http-service@3.0.3","_nodeVersion":"10.16.3","_npmVersion":"6.9.0","dist":{"integrity":"sha512-LUlnZT9Yb1u/MpCibNfNSY7JBB8UtGqktAdn43+d+s/rnnpbrHpk+DxqmxCKHWeLSfhVO31Z/fZw7LxwbLJ3bA==","shasum":"937bf61c04c7845c58b1f2cf9430ea69928b55db","tarball":"https://registry.npmjs.org/@fmal/http-service/-/http-service-3.0.3.tgz","fileCount":53,"unpackedSize":76240,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdpZ98CRA9TVsSAnZWagAA4dsQAJpw1MQ9MbrAWLyix+Rp\nteKbMtciFdYbM7SPRqOq6hPZhWmbL2kFYAKeHUgFxCenyXAAycDv14BsO2Bu\nUUiSm4n0+MvVB25W6Gstoj4DwK7drReFtxYQcHjgM2wqMEzrVov3ipZmgRHM\nEBaF7JXqwYJsVP8ZAA2f7glcfjA+xHsSmZjuu34FRl12tL2FgJhKqdKxohdr\nqFHctqaKa+UuNIsVX/6v4WUtflwPk+bcJi4rDBCPobLG07eb3+X/VUDFKjAr\njEYeMZH5cTPJ4yqc3sMMlb8LkyULGOZ0XNvy2BtbE+g7CDlX1mQTQcweNGeU\nAScI7bA/BShXCYMKzgyJZRTmIIZLFndVEU0BZvFjcExVkzhcU44Nd8EpfueG\nSAqGy4VLqYzbdT3jOsTuTzmVArobesxiCOabjzxcIfaKavjDBc4lig/LePYO\nH38yNEXxFv/ubQ97U6twnFe3oVNzHlrJhoY6qrsCxHKOdMrNdt/PL0EpJ3LA\nAZbApal9b9Ai2cVhHDHe9ghu95/iAHuqqH55psyT+RynIWWQo4EEEJI4l/iY\nV8oxIVIcllplq01bHSfFy0JYoE9R6ICPlLtR7rYZr2a9Iy0BBNUzZq8lIPh+\n9KUvQUiNC7/Yigka3/PoJt7LSeIQy9bYhqhRO32thXerdeRwtEZRkakJ2ec0\n5z+7\r\n=x5oA\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBMFrjQiI9n2BuBU4TR64Y/QTxEJVDbbwA517c1Zgdo8AiEAzvxWIoGYrH3ykpb2AAHCjBreasNFvoUA7FAG1RP3n4A="}]},"maintainers":[{"name":"fmal","email":"fmalinowski@gmail.com"}],"_npmUser":{"name":"fmal","email":"fmalinowski@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/http-service_3.0.3_1571135356131_0.8547534915714756"},"_hasShrinkwrap":false},"3.0.4-1577985485537":{"name":"@fmal/http-service","version":"3.0.4-1577985485537","description":"A HTTP service - orignally @cerebral/http","license":"UNLICENSED","keywords":["cerebral","cerebraljs","http"],"author":{"name":"Christian Alfoni","email":"christianalfoni@gmail.com"},"contributors":[{"name":"Filip Malinowski","email":"filip@fmal.me"}],"bugs":{"url":"https://github.com/fmal/monorepo/issues"},"repository":{"type":"git","url":"git+https://github.com/fmal/monorepo.git","directory":"packages/@fmal/http-service"},"publishConfig":{"access":"public"},"types":"dist/ts","main":"dist/cjs/index.js","module":"dist/es/index.js","sideEffects":false,"scripts":{"test":"jest","test:coverage":"npm test -- --coverage","lint":"eslint . --cache --fix --ext \".js,.ts\" --ignore-path ../../../.prettierignore","clean":"rimraf dist coverage ../../node_modules/@fmal/http-service","_babel":"babel src -x \".js,.ts\" --root-mode upward","prebuild":"npm run clean","copy:pkg":"cpy package.json ../../node_modules/@fmal/http-service && cpy factories/package.json ../../node_modules/@fmal/http-service/factories","copy:declarations":"cpy src/index.d.ts ../../node_modules/@fmal/http-service/dist/ts && cpy src/factories/index.d.ts ../../node_modules/@fmal/http-service/dist/ts/factories","postbuild":"run-p copy:*","build:cjs":"cross-env BABEL_ENV=cjs npm run _babel -- -d ../../node_modules/@fmal/http-service/dist/cjs","build:es":"cross-env BABEL_ENV=es npm run _babel -- -d ../../node_modules/@fmal/http-service/dist/es","build":"cross-env NODE_ENV=production run-p build:*","prepublishOnly":"rimraf dist && cpy \"@fmal/http-service/dist/**/*\" .. --cwd=../../node_modules --parents"},"dependencies":{"@babel/runtime":"7.7.7"},"devDependencies":{"@babel/cli":"7.7.7","cerebral":"5.2.0","cpy-cli":"2.0.0","cross-env":"6.0.3","eslint":"6.5.1","jest":"24.9.0","npm-run-all":"4.1.5","rimraf":"3.0.0","xhr-mock":"2.5.0"},"readme":"# @fmal/http-service\n\n[![npm](https://img.shields.io/npm/v/@fmal/http-service.svg?style=flat-square)](https://www.npmjs.com/package/@fmal/http-service)\n\nA HTTP service - originally `@cerebral/http`\n\n> Migrating from `@cerebral/http`? See the [migration guide](#migrating-from-cerebralhttp) at the bottom of this readme.\n\n## Install\n\n```\nnpm install @fmal/http-service\n```\n\n## Description\n\n`http-service` exposes the ability to do HTTP requests. It supports **cors** and file upload, with progress handling. It defaults to **json**, but you can configure it to whatever you want.\n\n`http-service` works great with [Cerebral](https://cerebraljs.com/) (with Cerebral-specific factories exposed) but the service itself (default export) does not depend on Cerebral, so you are free to use it in other contexts.\n\n```js\nimport { set } from 'cerebral/factories';\nimport { httpGet } from '@fmal/http-service/factories';\nimport { state, props, string } from 'cerebral';\n\nexport default [\n  httpGet(string`/items/${props`itemKey`}`),\n  set(state`app.currentItem`, props`result`)\n];\n```\n\nAll factories of HTTP service supports template tags.\n\n## Instantiate\n\n```js\nimport App, { Provider } from 'cerebral';\nimport HttpService from '@fmal/http-service';\n\nconst http = Provider(\n  HttpService({\n    // Prefix all requests with this url\n    baseUrl: 'https://api.github.com',\n\n    // Any default headers to pass on requests\n    headers: {\n      'Content-Type': 'application/json; charset=UTF-8',\n      Accept: 'application/json'\n    },\n\n    // When talking to cross origin (cors), pass cookies\n    // if set to true\n    withCredentials: false,\n\n    // Provide a global request timeout for all calls\n    // which can be overwritten for request by providing\n    // a different timeout when doing a request\n    // in actions or factories\n    timeout: 5000\n  })\n);\n\nconst app = App({\n  providers: { http }\n});\n```\n\nYou can update these default options in an action:\n\n```js\nfunction updateDefaultHttpOptions({ http }) {\n  http.updateOptions({\n    // Updated options\n  });\n}\n```\n\n## abort\n\nYou can abort any running request, causing the request to resolve as status code **0** and sets the type to **abort** on the error object.\n\n```js\nfunction searchItems({ props, path, http }) {\n  http.abort('/items*'); // regexp string\n  return http\n    .get(`/items?query=${props.query}`)\n    .then(path.success)\n    .catch(error => {\n      if (error.type === 'abort') {\n        return path.abort();\n      }\n\n      return path.error({ error });\n    });\n}\n\nexport default [\n  searchItems,\n  {\n    success: [],\n    error: [],\n    abort: []\n  }\n];\n```\n\n## cors\n\nCors has been turned into a \"black box\" by jQuery. Cors is actually a very simple concept, but due to a lot of confusion of \"Request not allowed\", **cors** has been an option to help out. In HttpService we try to give you the insight to understand how cors actually works.\n\nCors has nothing to do with the client. The only client configuration related to cors is the **withCredentials** option, which makes sure cookies are passed to the cross origin server. The only requirement for cors to work is that you pass the correct **Content-Type**. Now, this depends on the server in question. Some servers allows any content-type, others require a specific one. These are the typical ones:\n\n- text/plain\n- application/x-www-form-urlencoded\n- application/json; charset=UTF-8\n\nNote that this is only related to the **request**. If you want to define what you want as response, you set the **Accept** header, which is _application/json_ by default.\n\n## errors\n\n### HttpServiceError\n\n```js\nimport { HttpServiceError } from '@fmal/http-service';\n\n// Error structure\n{\n  name: 'HttpServiceError',\n  type: 'http | abort | timeout',\n  message: 'Some error message or responseText',\n  response: {\n    result: {}, // Parsed responseText\n    headers: {},\n    status: 200\n  },\n  stack: '...'\n}\n```\n\nThis error is available in the following scenarios:\n\n- Inside an action\n\n```js\nfunction someAction({ http }) {\n  return http.get('/something').catch(error => ...)\n}\n```\n\n- Going down an error path\n\n```js\n[\n  httpGet('/something'),\n  {\n    success: [],\n    error: [\n      // {error: ...}\n    ]\n  }\n];\n```\n\n- To module catch handlers\n\n```js\nconst errorCatched = [\n  // {error: ...}\n  displayError\n];\n\nconst module = {\n  catch: [[HttpServiceError, errorCatched]]\n};\n```\n\n## delete\n\n### action\n\n```js\nfunction someDeleteAction({ http }) {\n  const query = {};\n  const options = {};\n\n  return http\n    .delete('/items/1', query, options)\n    .then(response => {\n      return { response };\n    })\n    .catch(error => {\n      return { error };\n    });\n}\n```\n\n### factory\n\n```js\nimport { httpDelete } from '@fmal/http-service/factories';\nimport { state, string } from 'cerebral';\n\nexport default [\n  httpDelete(string`/items/${state`currentItemId`}`)\n  /*\n    PROPS: {\n      response: {...}\n    }\n  */\n];\n```\n\n### factory with paths\n\n```js\nimport { httpDelete } from '@cerebral/http/factories';\nimport { state, string } from 'cerebral';\n\nexport default [\n  httpDelete(string`/items/${state`currentItemId`}`),\n  {\n    success: [\n      /* PROPS: {response: {...}} */\n    ],\n    error: [\n      /* PROPS: {error: {...}} */\n    ],\n    abort: [\n      /* PROPS: {error: {...}} */\n    ],\n    timeout: [\n      /* PROPS: {error: {...}} */\n    ],\n\n    // Optionally any status code, ex. 404: []\n    '${STATUS_CODE}': [\n      /* PROPS: {response/error: {...}} */\n    ]\n  }\n];\n```\n\n## get\n\n### action\n\n```js\nfunction someGetAction({ http }) {\n  const query = {};\n  const options = {};\n\n  return http\n    .get('/items', query, options)\n    .then(response => {\n      return { someResponse: response };\n    })\n    .catch(error => {\n      return { someError: error };\n    });\n}\n```\n\n### factory\n\n```js\nimport { httpGet } from '@fmal/http-service/factories';\n\nexport default [\n  httpGet('/items')\n  /*\n    PROPS: {\n      response: {...}\n    }\n  */\n];\n```\n\nOn error this will throw to the signal or global catch handler.\n\n### factory with paths\n\n```js\nimport { httpGet } from '@fmal/http-service/factories';\n\nexport default [\n  httpGet('/items'),\n  {\n    success: [\n      /* PROPS: {response: {...}} */\n    ],\n    error: [\n      /* PROPS: {error: {...}} */\n    ],\n    abort: [\n      /* PROPS: {error: {...}} */\n    ],\n    timeout: [\n      /* PROPS: {error: {...}} */\n    ],\n\n    // Optionally any status code, ex. 404: []\n    '${STATUS_CODE}': [\n      /* PROPS: {response/error: {...}} */\n    ]\n  }\n];\n```\n\n## patch\n\n### action\n\n```js\nfunction somePatchAction({ http }) {\n  const data = {};\n  const options = {};\n\n  return http\n    .patch('/items/1', data, options)\n    .then(response => {\n      return { response };\n    })\n    .catch(error => {\n      return { error };\n    });\n}\n```\n\n### factory\n\n```js\nimport { httpPatch } from '@fmal/http-service/factories';\nimport { state, props, string } from 'cerebral';\n\nexport default [\n  httpPatch(string`/items/${props`itemId`}`, state`patchData`)\n  /*\n    PROPS: {\n      response: {...}\n    }\n  */\n];\n```\n\n### factory with paths\n\n```js\nimport { httpPatch } from '@fmal/http-service/factories';\nimport { state, props, string } from 'cerebral';\n\nexport default [\n  httpPatch(string`/items/${props`itemId`}`, state`patchData`),\n  {\n    success: [\n      /* PROPS: {response: {...}} */\n    ],\n    error: [\n      /* PROPS: {error: {...}} */\n    ],\n    abort: [\n      /* PROPS: {error: {...}} */\n    ],\n    timeout: [\n      /* PROPS: {error: {...}} */\n    ],\n\n    // Optionally any status code, ex. 404: []\n    '${STATUS_CODE}': [\n      /* PROPS: {response/error: {...}} */\n    ]\n  }\n];\n```\n\n## post\n\n### action\n\n```js\nfunction somePostAction({ http }) {\n  const data = {};\n  const options = {};\n\n  return http\n    .post('/items', data, options)\n    .then(response => {\n      return { response };\n    })\n    .catch(error => {\n      return { error };\n    });\n}\n```\n\n### factory\n\n```js\nimport { httpPost } from '@fmal/http-service/factories';\nimport { props } from 'cerebral';\n\nexport default [\n  httpPost('/items', {\n    title: props`itemTitle`,\n    foo: 'bar'\n  })\n  /*\n    PROPS: {\n      response: {...}\n    }\n  */\n];\n```\n\n### factory with paths\n\n```js\nimport { httpPost } from '@fmal/http-service/factories';\nimport { props } from 'cerebral';\n\nexport default [\n  httpPost('/items', {\n    title: props`itemTitle`,\n    foo: 'bar'\n  }),\n  {\n    success: [\n      /* PROPS: {response: {...}} */\n    ],\n    error: [\n      /* PROPS: {error: {...}} */\n    ],\n    abort: [\n      /* PROPS: {error: {...}} */\n    ],\n    timeout: [\n      /* PROPS: {error: {...}} */\n    ],\n\n    // Optionally any status code, ex. 404: []\n    '${STATUS_CODE}': [\n      /* PROPS: {response/error: {...}} */\n    ]\n  }\n];\n```\n\n## put\n\n### action\n\n```js\nfunction somePutAction({ http }) {\n  const data = {};\n  const options = {};\n\n  return http\n    .put('/items/1', data, options)\n    .then(response => {\n      return { response };\n    })\n    .catch(error => {\n      return { error };\n    });\n}\n```\n\n### factory\n\n```js\nimport { httpPut } from '@fmal/http-service/factories';\n\nexport default [\n  httpPut('/items', {\n    // data object\n  })\n  /*\n    PROPS: {\n      response: {...}\n    }\n  */\n];\n```\n\n### factory with paths\n\n```js\nimport { httpPut } from '@fmal/http-service/factories';\n\nexport default [\n  httpPut('/items', {\n    // data object\n  }),\n  {\n    success: [\n      /* PROPS: {response: {...}} */\n    ],\n    error: [\n      /* PROPS: {error: {...}} */\n    ],\n    abort: [\n      /* PROPS: {error: {...}} */\n    ],\n    timeout: [\n      /* PROPS: {error: {...}} */\n    ],\n\n    // Optionally any status code, ex. 404: []\n    '${STATUS_CODE}': [\n      /* PROPS: {response/error: {...}} */\n    ]\n  }\n];\n```\n\n## responses\n\nThere are two types of responses from the HTTP service. A **response** and an **error** of type _HttpServiceError_. A **response** will be received on status codes 200-299. Everything else is an **error**.\n\n### response\n\n```js\n{\n  result: 'the response body',\n  headers: {...},\n  status: 200\n}\n```\n\n### error\n\n```js\n{\n  name: 'HttpServiceError',\n  type: 'http | abort | timeout',\n  message: 'Some potential error message',\n  result: 'Message or response body',\n  status: 500,\n  headers: {},\n  stack: '...'\n}\n```\n\n## request\n\n```js\nfunction someGetAction ({http}) {\n  return http.request({\n    // Any http method\n    method: 'GET',\n\n    // Url you want to request to\n    url: '/items'\n\n    // Request body as object. Will automatically be stringified if json and\n    // urlEncoded if application/x-www-form-urlencoded\n    body: {},\n\n    // Query as object, will automatically be urlEncoded\n    query: {},\n\n    // If cross origin request, pass cookies\n    withCredentials: false,\n\n    // Any additional http headers, or overwrite default\n    headers: {},\n\n    // A function or signal path (foo.bar.requestProgressed) that\n    // triggers on request progress. Passes {progress: 45} etc.\n    onProgress: null\n  })\n}\n```\n\n## uploadFile\n\n### action\n\n```js\nfunction someDeleteAction({ http, props }) {\n  return http\n    .uploadFile('/upload', props.files, {\n      name: 'filename.png', // Default to \"files\"\n      data: {}, // Additional form data\n      headers: {},\n      onProgress: 'some.signal.path' // Upload progress\n    })\n    .then(response => {\n      return { response };\n    })\n    .catch(error => {\n      return { error };\n    });\n}\n```\n\n### factory\n\n```js\nimport { httpUploadFile } from '@fmal/http-service/factories';\nimport { state, props } from 'cerebral';\n\nexport default [\n  httpUploadFile('/uploads', props`file`, {\n    name: state`currentFileName`\n  }),\n  {\n    success: [\n      /* PROPS: {response: {...}} */\n    ],\n    error: [\n      /* PROPS: {error: {...}} */\n    ],\n    abort: [\n      /* PROPS: {error: {...}} */\n    ],\n\n    // Optionally any status code, ex. 404: []\n    '${STATUS_CODE}': [\n      /* PROPS: {response/error: {...}} */\n    ]\n  }\n];\n```\n\n### factory with paths\n\n```js\nimport { httpUploadFile } from '@fmal/http-service/factories';\nimport { state, props } from 'cerebral/tags';\n\nexport default [\n  httpUploadFile('/uploads', props`file`, {\n    name: state`currentFileName`\n  })\n  /*\n    PROPS: {\n      response: {...}\n    }\n  */\n];\n```\n\n## Migrating from @cerebral/http\n\nSince `http-service` does not depend on Cerebral it does not use `Provider`, but you can wrap `http-service` in `Provider` for the same effect:\n\n```diff\n-import { Controller, Module } from 'cerebral';\n-import HttpProvider from '@cerebral/http';\n+import App, { Provider } from 'cerebral';\n+import HttpService from '@fmal/http-service';\n\n-export default Controller(\n-  Module({\n-    providers: {\n-      http: HttpProvider({})\n-    }\n-  })\n-);\n+export default App({\n+  providers: {\n+    http: Provider(HttpService({}))\n+  }\n+});\n```\n\n`http-service` uses `HttpServiceError` error instead of `HttpProviderError`:\n\n```diff\n-import { HttpProviderError } from '@cerebral/http';\n+import { HttpServiceError } from '@fmal/http-service';\n```\n\n“operators” are changed with “factories”, to follow the naming introduced in Cerebral 5.0.\nFactories are exported under `@fmal/http-service/factories` and they are optional, meaning if you're\nusing `http-service` outside Cerebral app, you don't have to import (and thus bundle) them in your codebase.\n\n```diff\n-import { httpGet } from '@cerebral/http/operators';\n+import { httpGet } from '@fmal/http-service/factories';\n```\n","readmeFilename":"README.md","homepage":"https://github.com/fmal/monorepo#readme","_id":"@fmal/http-service@3.0.4-1577985485537","_nodeVersion":"10.18.0","_npmVersion":"6.13.4","dist":{"integrity":"sha512-EDP+JYX691PTf95SuBGDnTwjpGEAEGs5lfNlqIO5Prn+8FWzEkNojd8Dplkl0VibMg9DszmNy0AXGndIKhjsZg==","shasum":"c4e5f05a76f36c86a216b22eeb01f610a01146a8","tarball":"https://registry.npmjs.org/@fmal/http-service/-/http-service-3.0.4-1577985485537.tgz","fileCount":53,"unpackedSize":76309,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeDiXqCRA9TVsSAnZWagAANg8P+gL0CKOMgnnw/FhwNjkF\n30unrc0lPXFOVnXrNfqmG7Nbg0CaEfiWT94wLWw1tZzin59pFkblm9pEa3vD\nwAkONHnyAtrPUPlNRTdv3z9njuzWeco2gg/JkUkuQjxKktZ1uAEMUw2gO3TD\n226W6NTlPYLsO/pHgbM9TDNQSuTxj1wPRCMmo2LpbZfgblEPBxX/7MWkOBQS\nYSDGnp4nf4sz5jmoUJoEcCGD7QXVPRrjMPDpkMz6hyFp4tsyoOXqLYxavmDU\nfg4etTaIqMNNePYZSpzstNLR1DdJssaS1iuswmsbLmgVWELyL9k7S4aU/X2K\nKMP9573mFBY8AVW3r38VNJ+UJTzmxrF31gm/Ib+xF3ZTaCt5zvkWwj3QkE22\nAhsW+g1utk4Tjw3WOXTavw3rYsDv3camh9XmrfUenzx26ml//YHAedNHPCQc\nbRKSBR60RzF2LtQLJPVEGpVYqQrddWTFrkScoXLjwat4MPxhfU0jNuCpnuW0\nzwFef0E8dKm8rMRTwmEcVw1KQ8pBwwgfCDvfZN8VcdZ8lH3HNcpu1C07RucZ\nvC07JH56+mxrnsqzVexhCgaUFgaStNEwKrfuu352KNHfAcDUPPANBDws5dwQ\nVnczwxmZO07bWY9mTzd6kx213HsgQB78FRhP9V1MICQWj7g26x2eqZhTsthA\nCV98\r\n=ii6t\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGxRrKcJGFEtt4+zRyH//vuc7mVgCuLQ6pLrifB94t2OAiEAk2EXjx0EJhacZgFiNpcZySLX2xfGC3fNmRJRjen29v0="}]},"maintainers":[{"name":"fmal","email":"fmalinowski@gmail.com"}],"_npmUser":{"name":"fmal","email":"fmalinowski@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/http-service_3.0.4-1577985485537_1577985513937_0.46062479495954856"},"_hasShrinkwrap":false},"3.0.4":{"name":"@fmal/http-service","version":"3.0.4","description":"A HTTP service - orignally @cerebral/http","license":"UNLICENSED","keywords":["cerebral","cerebraljs","http"],"author":{"name":"Christian Alfoni","email":"christianalfoni@gmail.com"},"contributors":[{"name":"Filip Malinowski","email":"filip@fmal.me"}],"bugs":{"url":"https://github.com/fmal/monorepo/issues"},"repository":{"type":"git","url":"git+https://github.com/fmal/monorepo.git","directory":"packages/@fmal/http-service"},"publishConfig":{"access":"public"},"types":"dist/ts","main":"dist/cjs/index.js","module":"dist/es/index.js","sideEffects":false,"scripts":{"test":"jest","test:coverage":"npm test -- --coverage","lint":"eslint . --cache --fix --ext \".js,.ts\" --ignore-path ../../../.prettierignore","clean":"rimraf dist coverage ../../node_modules/@fmal/http-service","_babel":"babel src -x \".js,.ts\" --root-mode upward","prebuild":"npm run clean","copy:pkg":"cpy package.json ../../node_modules/@fmal/http-service && cpy factories/package.json ../../node_modules/@fmal/http-service/factories","copy:declarations":"cpy src/index.d.ts ../../node_modules/@fmal/http-service/dist/ts && cpy src/factories/index.d.ts ../../node_modules/@fmal/http-service/dist/ts/factories","postbuild":"run-p copy:*","build:cjs":"cross-env BABEL_ENV=cjs npm run _babel -- -d ../../node_modules/@fmal/http-service/dist/cjs","build:es":"cross-env BABEL_ENV=es npm run _babel -- -d ../../node_modules/@fmal/http-service/dist/es","build":"cross-env NODE_ENV=production run-p build:*","prepublishOnly":"rimraf dist && cpy \"@fmal/http-service/dist/**/*\" .. --cwd=../../node_modules --parents"},"dependencies":{"@babel/runtime":"7.7.7"},"devDependencies":{"@babel/cli":"7.7.7","cerebral":"5.2.0","cpy-cli":"2.0.0","cross-env":"6.0.3","eslint":"6.5.1","jest":"24.9.0","npm-run-all":"4.1.5","rimraf":"3.0.0","xhr-mock":"2.5.0"},"homepage":"https://github.com/fmal/monorepo#readme","_id":"@fmal/http-service@3.0.4","_nodeVersion":"10.18.0","_npmVersion":"6.13.4","dist":{"integrity":"sha512-OY6fhprcEVCypTZW7gaHTVKUBEL+ppaa36jQLMRcjyujisg0a9YQT+fOkiFgCKaKFFKizY0qgi1rb/hbOJaGIA==","shasum":"a55d27c1ceb0172c9db9bfba43b457c75ac2e7b0","tarball":"https://registry.npmjs.org/@fmal/http-service/-/http-service-3.0.4.tgz","fileCount":53,"unpackedSize":76295,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeDianCRA9TVsSAnZWagAAX7UP/j9FBMyewa3D4wzpqfPn\nfQwsIwDOHhWRHIGcl9a51xXrX9jwpBLrgRdwbmqXdXf+YVUkcpVJ8geSG+v9\nCFJ0HMLXp/U/sL3CVEUgbuiByhykc0SjjIV0T58bdcClx5+p7NNFSkPi+p9f\nBR5AZheW2qecQMcgzKlyRNq8Z1I/WsrsdvEeQBr8iXS7Bk0Znb5K4EAHKeMW\nCcSjk39AC/30GXih1TO1PkmJgzBSWdTnh+6IXgTqvw/KwVZbP+hN7sXhWchb\n2TzFMtxQqofHMhCx/fEhcI0lVBc9HF865zCgXztlBnvpweSV1pGu5+Nka8Xb\nNIs66UvhKhHWlehDDCwibyhNZM/GBCyxc/a0T/6UfcuqEo7nlXGsNWctG8pq\ngHz9ubUfnONJUEQqM8+XZNhywOPzmq8xdaWsg5jMVJLKDrNvvx92Z9SjCAjJ\nA0Sai2bhr16ElvCoZlpMVWVbDs9qEMEASGiaci9D51fui+ahOVhdKkofnHXZ\nH0fqGQFMmWjJHf+PUCB3UOU6+4ZvAyWTESwuDsqnZ0ef0lgDo9TjZQAjEI+N\nzw1EfiYvIIraRckQRmZDDV6qzSloWROXhQWzsQKdGycMBZF2LKxA8nAms/xF\nmviXzZh44uXSu0ZNWgK+HMDVnjLwSz91IHKI0kp38fC369UJPuqlXzFClFw+\nCDrs\r\n=b5g5\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHEwHCu5/noMbcFlfgj6G1edM8M67hcTS8zn82y7Kq0RAiBECYYsouXIZEDyAQ/bkxPWYKm1eKCAhv7Fn3OnX1npMA=="}]},"maintainers":[{"name":"fmal","email":"fmalinowski@gmail.com"}],"_npmUser":{"name":"fmal","email":"fmalinowski@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/http-service_3.0.4_1577985702797_0.965238909835274"},"_hasShrinkwrap":false},"3.0.5-1602948849571":{"name":"@fmal/http-service","version":"3.0.5-1602948849571","description":"A HTTP service - orignally @cerebral/http","license":"UNLICENSED","keywords":["cerebral","cerebraljs","http"],"author":{"name":"Christian Alfoni","email":"christianalfoni@gmail.com"},"contributors":[{"name":"Filip Malinowski","email":"filip@fmal.me"}],"bugs":{"url":"https://github.com/fmal/monorepo/issues"},"repository":{"type":"git","url":"git+https://github.com/fmal/monorepo.git","directory":"packages/@fmal/http-service"},"publishConfig":{"access":"public"},"types":"dist/ts","main":"dist/cjs/index.js","module":"dist/es/index.js","sideEffects":false,"scripts":{"test":"jest","test:coverage":"npm test -- --coverage","lint":"eslint . --cache --fix --ext \".js,.ts\" --ignore-path ../../../.prettierignore","clean":"rimraf dist coverage ../../node_modules/@fmal/http-service","_babel":"babel src -x \".js,.ts\" --root-mode upward","prebuild":"npm run clean","copy:pkg":"cpy package.json ../../node_modules/@fmal/http-service && cpy factories/package.json ../../node_modules/@fmal/http-service/factories","copy:declarations":"cpy src/index.d.ts ../../node_modules/@fmal/http-service/dist/ts && cpy src/factories/index.d.ts ../../node_modules/@fmal/http-service/dist/ts/factories","postbuild":"run-p copy:*","build:cjs":"cross-env BABEL_ENV=cjs npm run _babel -- -d ../../node_modules/@fmal/http-service/dist/cjs","build:es":"cross-env BABEL_ENV=es npm run _babel -- -d ../../node_modules/@fmal/http-service/dist/es","build":"cross-env NODE_ENV=production run-p build:*","prepublishOnly":"rimraf dist && cpy \"@fmal/http-service/dist/**/*\" .. --cwd=../../node_modules --parents"},"dependencies":{"@babel/runtime":"7.7.7"},"devDependencies":{"@babel/cli":"7.7.7","cerebral":"5.2.0","cpy-cli":"2.0.0","cross-env":"6.0.3","eslint":"6.5.1","jest":"24.9.0","npm-run-all":"4.1.5","rimraf":"3.0.0","xhr-mock":"2.5.0"},"readme":"# @fmal/http-service\n\n[![npm](https://img.shields.io/npm/v/@fmal/http-service.svg?style=flat-square)](https://www.npmjs.com/package/@fmal/http-service)\n\nA HTTP service - originally `@cerebral/http`\n\n> Migrating from `@cerebral/http`? See the [migration guide](#migrating-from-cerebralhttp) at the bottom of this readme.\n\n## Install\n\n```\nnpm install @fmal/http-service\n```\n\n## Description\n\n`http-service` exposes the ability to do HTTP requests. It supports **cors** and file upload, with progress handling. It defaults to **json**, but you can configure it to whatever you want.\n\n`http-service` works great with [Cerebral](https://cerebraljs.com/) (with Cerebral-specific factories exposed) but the service itself (default export) does not depend on Cerebral, so you are free to use it in other contexts.\n\n```js\nimport { set } from 'cerebral/factories';\nimport { httpGet } from '@fmal/http-service/factories';\nimport { state, props, string } from 'cerebral';\n\nexport default [\n  httpGet(string`/items/${props`itemKey`}`),\n  set(state`app.currentItem`, props`result`)\n];\n```\n\nAll factories of HTTP service supports template tags.\n\n## Instantiate\n\n```js\nimport App, { Provider } from 'cerebral';\nimport HttpService from '@fmal/http-service';\n\nconst http = Provider(\n  HttpService({\n    // Prefix all requests with this url\n    baseUrl: 'https://api.github.com',\n\n    // Any default headers to pass on requests\n    headers: {\n      'Content-Type': 'application/json; charset=UTF-8',\n      Accept: 'application/json'\n    },\n\n    // When talking to cross origin (cors), pass cookies\n    // if set to true\n    withCredentials: false,\n\n    // Provide a global request timeout for all calls\n    // which can be overwritten for request by providing\n    // a different timeout when doing a request\n    // in actions or factories\n    timeout: 5000\n  })\n);\n\nconst app = App({\n  providers: { http }\n});\n```\n\nYou can update these default options in an action:\n\n```js\nfunction updateDefaultHttpOptions({ http }) {\n  http.updateOptions({\n    // Updated options\n  });\n}\n```\n\n## abort\n\nYou can abort any running request, causing the request to resolve as status code **0** and sets the type to **abort** on the error object.\n\n```js\nfunction searchItems({ props, path, http }) {\n  http.abort('/items*'); // regexp string\n  return http\n    .get(`/items?query=${props.query}`)\n    .then(path.success)\n    .catch(error => {\n      if (error.type === 'abort') {\n        return path.abort();\n      }\n\n      return path.error({ error });\n    });\n}\n\nexport default [\n  searchItems,\n  {\n    success: [],\n    error: [],\n    abort: []\n  }\n];\n```\n\n## cors\n\nCors has been turned into a \"black box\" by jQuery. Cors is actually a very simple concept, but due to a lot of confusion of \"Request not allowed\", **cors** has been an option to help out. In HttpService we try to give you the insight to understand how cors actually works.\n\nCors has nothing to do with the client. The only client configuration related to cors is the **withCredentials** option, which makes sure cookies are passed to the cross origin server. The only requirement for cors to work is that you pass the correct **Content-Type**. Now, this depends on the server in question. Some servers allows any content-type, others require a specific one. These are the typical ones:\n\n- text/plain\n- application/x-www-form-urlencoded\n- application/json; charset=UTF-8\n\nNote that this is only related to the **request**. If you want to define what you want as response, you set the **Accept** header, which is _application/json_ by default.\n\n## errors\n\n### HttpServiceError\n\n```js\nimport { HttpServiceError } from '@fmal/http-service';\n\n// Error structure\n{\n  name: 'HttpServiceError',\n  type: 'http | abort | timeout',\n  message: 'Some error message or responseText',\n  response: {\n    result: {}, // Parsed responseText\n    headers: {},\n    status: 200\n  },\n  stack: '...'\n}\n```\n\nThis error is available in the following scenarios:\n\n- Inside an action\n\n```js\nfunction someAction({ http }) {\n  return http.get('/something').catch(error => ...)\n}\n```\n\n- Going down an error path\n\n```js\n[\n  httpGet('/something'),\n  {\n    success: [],\n    error: [\n      // {error: ...}\n    ]\n  }\n];\n```\n\n- To module catch handlers\n\n```js\nconst errorCatched = [\n  // {error: ...}\n  displayError\n];\n\nconst module = {\n  catch: [[HttpServiceError, errorCatched]]\n};\n```\n\n## delete\n\n### action\n\n```js\nfunction someDeleteAction({ http }) {\n  const query = {};\n  const options = {};\n\n  return http\n    .delete('/items/1', query, options)\n    .then(response => {\n      return { response };\n    })\n    .catch(error => {\n      return { error };\n    });\n}\n```\n\n### factory\n\n```js\nimport { httpDelete } from '@fmal/http-service/factories';\nimport { state, string } from 'cerebral';\n\nexport default [\n  httpDelete(string`/items/${state`currentItemId`}`)\n  /*\n    PROPS: {\n      response: {...}\n    }\n  */\n];\n```\n\n### factory with paths\n\n```js\nimport { httpDelete } from '@cerebral/http/factories';\nimport { state, string } from 'cerebral';\n\nexport default [\n  httpDelete(string`/items/${state`currentItemId`}`),\n  {\n    success: [\n      /* PROPS: {response: {...}} */\n    ],\n    error: [\n      /* PROPS: {error: {...}} */\n    ],\n    abort: [\n      /* PROPS: {error: {...}} */\n    ],\n    timeout: [\n      /* PROPS: {error: {...}} */\n    ],\n\n    // Optionally any status code, ex. 404: []\n    '${STATUS_CODE}': [\n      /* PROPS: {response/error: {...}} */\n    ]\n  }\n];\n```\n\n## get\n\n### action\n\n```js\nfunction someGetAction({ http }) {\n  const query = {};\n  const options = {};\n\n  return http\n    .get('/items', query, options)\n    .then(response => {\n      return { someResponse: response };\n    })\n    .catch(error => {\n      return { someError: error };\n    });\n}\n```\n\n### factory\n\n```js\nimport { httpGet } from '@fmal/http-service/factories';\n\nexport default [\n  httpGet('/items')\n  /*\n    PROPS: {\n      response: {...}\n    }\n  */\n];\n```\n\nOn error this will throw to the signal or global catch handler.\n\n### factory with paths\n\n```js\nimport { httpGet } from '@fmal/http-service/factories';\n\nexport default [\n  httpGet('/items'),\n  {\n    success: [\n      /* PROPS: {response: {...}} */\n    ],\n    error: [\n      /* PROPS: {error: {...}} */\n    ],\n    abort: [\n      /* PROPS: {error: {...}} */\n    ],\n    timeout: [\n      /* PROPS: {error: {...}} */\n    ],\n\n    // Optionally any status code, ex. 404: []\n    '${STATUS_CODE}': [\n      /* PROPS: {response/error: {...}} */\n    ]\n  }\n];\n```\n\n## patch\n\n### action\n\n```js\nfunction somePatchAction({ http }) {\n  const data = {};\n  const options = {};\n\n  return http\n    .patch('/items/1', data, options)\n    .then(response => {\n      return { response };\n    })\n    .catch(error => {\n      return { error };\n    });\n}\n```\n\n### factory\n\n```js\nimport { httpPatch } from '@fmal/http-service/factories';\nimport { state, props, string } from 'cerebral';\n\nexport default [\n  httpPatch(string`/items/${props`itemId`}`, state`patchData`)\n  /*\n    PROPS: {\n      response: {...}\n    }\n  */\n];\n```\n\n### factory with paths\n\n```js\nimport { httpPatch } from '@fmal/http-service/factories';\nimport { state, props, string } from 'cerebral';\n\nexport default [\n  httpPatch(string`/items/${props`itemId`}`, state`patchData`),\n  {\n    success: [\n      /* PROPS: {response: {...}} */\n    ],\n    error: [\n      /* PROPS: {error: {...}} */\n    ],\n    abort: [\n      /* PROPS: {error: {...}} */\n    ],\n    timeout: [\n      /* PROPS: {error: {...}} */\n    ],\n\n    // Optionally any status code, ex. 404: []\n    '${STATUS_CODE}': [\n      /* PROPS: {response/error: {...}} */\n    ]\n  }\n];\n```\n\n## post\n\n### action\n\n```js\nfunction somePostAction({ http }) {\n  const data = {};\n  const options = {};\n\n  return http\n    .post('/items', data, options)\n    .then(response => {\n      return { response };\n    })\n    .catch(error => {\n      return { error };\n    });\n}\n```\n\n### factory\n\n```js\nimport { httpPost } from '@fmal/http-service/factories';\nimport { props } from 'cerebral';\n\nexport default [\n  httpPost('/items', {\n    title: props`itemTitle`,\n    foo: 'bar'\n  })\n  /*\n    PROPS: {\n      response: {...}\n    }\n  */\n];\n```\n\n### factory with paths\n\n```js\nimport { httpPost } from '@fmal/http-service/factories';\nimport { props } from 'cerebral';\n\nexport default [\n  httpPost('/items', {\n    title: props`itemTitle`,\n    foo: 'bar'\n  }),\n  {\n    success: [\n      /* PROPS: {response: {...}} */\n    ],\n    error: [\n      /* PROPS: {error: {...}} */\n    ],\n    abort: [\n      /* PROPS: {error: {...}} */\n    ],\n    timeout: [\n      /* PROPS: {error: {...}} */\n    ],\n\n    // Optionally any status code, ex. 404: []\n    '${STATUS_CODE}': [\n      /* PROPS: {response/error: {...}} */\n    ]\n  }\n];\n```\n\n## put\n\n### action\n\n```js\nfunction somePutAction({ http }) {\n  const data = {};\n  const options = {};\n\n  return http\n    .put('/items/1', data, options)\n    .then(response => {\n      return { response };\n    })\n    .catch(error => {\n      return { error };\n    });\n}\n```\n\n### factory\n\n```js\nimport { httpPut } from '@fmal/http-service/factories';\n\nexport default [\n  httpPut('/items', {\n    // data object\n  })\n  /*\n    PROPS: {\n      response: {...}\n    }\n  */\n];\n```\n\n### factory with paths\n\n```js\nimport { httpPut } from '@fmal/http-service/factories';\n\nexport default [\n  httpPut('/items', {\n    // data object\n  }),\n  {\n    success: [\n      /* PROPS: {response: {...}} */\n    ],\n    error: [\n      /* PROPS: {error: {...}} */\n    ],\n    abort: [\n      /* PROPS: {error: {...}} */\n    ],\n    timeout: [\n      /* PROPS: {error: {...}} */\n    ],\n\n    // Optionally any status code, ex. 404: []\n    '${STATUS_CODE}': [\n      /* PROPS: {response/error: {...}} */\n    ]\n  }\n];\n```\n\n## responses\n\nThere are two types of responses from the HTTP service. A **response** and an **error** of type _HttpServiceError_. A **response** will be received on status codes 200-299. Everything else is an **error**.\n\n### response\n\n```js\n{\n  result: 'the response body',\n  headers: {...},\n  status: 200\n}\n```\n\n### error\n\n```js\n{\n  name: 'HttpServiceError',\n  type: 'http | abort | timeout',\n  message: 'Some potential error message',\n  result: 'Message or response body',\n  status: 500,\n  headers: {},\n  stack: '...'\n}\n```\n\n## request\n\n```js\nfunction someGetAction ({http}) {\n  return http.request({\n    // Any http method\n    method: 'GET',\n\n    // Url you want to request to\n    url: '/items'\n\n    // Request body as object. Will automatically be stringified if json and\n    // urlEncoded if application/x-www-form-urlencoded\n    body: {},\n\n    // Query as object, will automatically be urlEncoded\n    query: {},\n\n    // If cross origin request, pass cookies\n    withCredentials: false,\n\n    // Any additional http headers, or overwrite default\n    headers: {},\n\n    // A function or signal path (foo.bar.requestProgressed) that\n    // triggers on request progress. Passes {progress: 45} etc.\n    onProgress: null\n  })\n}\n```\n\n## uploadFile\n\n### action\n\n```js\nfunction someDeleteAction({ http, props }) {\n  return http\n    .uploadFile('/upload', props.files, {\n      name: 'filename.png', // Default to \"files\"\n      data: {}, // Additional form data\n      headers: {},\n      onProgress: 'some.signal.path' // Upload progress\n    })\n    .then(response => {\n      return { response };\n    })\n    .catch(error => {\n      return { error };\n    });\n}\n```\n\n### factory\n\n```js\nimport { httpUploadFile } from '@fmal/http-service/factories';\nimport { state, props } from 'cerebral';\n\nexport default [\n  httpUploadFile('/uploads', props`file`, {\n    name: state`currentFileName`\n  }),\n  {\n    success: [\n      /* PROPS: {response: {...}} */\n    ],\n    error: [\n      /* PROPS: {error: {...}} */\n    ],\n    abort: [\n      /* PROPS: {error: {...}} */\n    ],\n\n    // Optionally any status code, ex. 404: []\n    '${STATUS_CODE}': [\n      /* PROPS: {response/error: {...}} */\n    ]\n  }\n];\n```\n\n### factory with paths\n\n```js\nimport { httpUploadFile } from '@fmal/http-service/factories';\nimport { state, props } from 'cerebral/tags';\n\nexport default [\n  httpUploadFile('/uploads', props`file`, {\n    name: state`currentFileName`\n  })\n  /*\n    PROPS: {\n      response: {...}\n    }\n  */\n];\n```\n\n## Migrating from @cerebral/http\n\nSince `http-service` does not depend on Cerebral it does not use `Provider`, but you can wrap `http-service` in `Provider` for the same effect:\n\n```diff\n-import { Controller, Module } from 'cerebral';\n-import HttpProvider from '@cerebral/http';\n+import App, { Provider } from 'cerebral';\n+import HttpService from '@fmal/http-service';\n\n-export default Controller(\n-  Module({\n-    providers: {\n-      http: HttpProvider({})\n-    }\n-  })\n-);\n+export default App({\n+  providers: {\n+    http: Provider(HttpService({}))\n+  }\n+});\n```\n\n`http-service` uses `HttpServiceError` error instead of `HttpProviderError`:\n\n```diff\n-import { HttpProviderError } from '@cerebral/http';\n+import { HttpServiceError } from '@fmal/http-service';\n```\n\n“operators” are changed with “factories”, to follow the naming introduced in Cerebral 5.0.\nFactories are exported under `@fmal/http-service/factories` and they are optional, meaning if you're\nusing `http-service` outside Cerebral app, you don't have to import (and thus bundle) them in your codebase.\n\n```diff\n-import { httpGet } from '@cerebral/http/operators';\n+import { httpGet } from '@fmal/http-service/factories';\n```\n","readmeFilename":"README.md","homepage":"https://github.com/fmal/monorepo#readme","_id":"@fmal/http-service@3.0.5-1602948849571","_nodeVersion":"10.22.1","_npmVersion":"6.14.6","dist":{"integrity":"sha512-gO34f2KqdtFMbubQUGLOmuJWGu0dIdFjbJSls+J+An86LiGMWQ/SZb95EGyK+iKx0gspAPloF1HjUU28brlzKA==","shasum":"8df69e8869029427d28ef4a7185c162a2015415a","tarball":"https://registry.npmjs.org/@fmal/http-service/-/http-service-3.0.5-1602948849571.tgz","fileCount":53,"unpackedSize":76661,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfiw8PCRA9TVsSAnZWagAAA90P/3Vypj036jZiI5b3bbTM\nYs4tb9YfMU5kou0SheTwf0LrUfDAFB3lgMuNhdpnjz06pNAPLCQufUVxOhCP\nkX2cSs9RLrF/tWDXVp6y/Eq5+iFUDGT7RWxcqTeSA4t5p6Zo/S8S+qJGwmF5\nSZyuK0tqdDL9dbUwF4Bhu/jXaO5WLIF/7cDjPLn2LjHd/a8PqUPZAMTQSGFz\nc6BWWTkHKaIc5lRlg27Jy9CHqbRm7/VTNaX+qFfZz3WkWsJ2PU09oIGGwcqG\n0T+sXpl5mkFDSEJ3oyA8/8whpfYnj1wqk8EZBWMaEGJludeliHDj4peM2qWt\nJfMVvyNmFPbRQuxMpPA/vh3KP8KZoSsLbrbWCrGHku6XdSBM9sdUYPA78HCc\nc0aplEDpls1ufHyeR70PlljyiYjuX1KI0Avt6qEex0LS9nPk6HnBiumshHQF\nsqp3uxH/7MeI+AZBr1VVFdAmcNzM/kv2h/yfXQ4AGNR5+PmDdKvouHwBz9X+\nHliTZIzovWjUS7EpAs7U4rBWOGxnSab7bpdGqnzoDeG4XmxvptTLPORFlbnF\nz0hRgPD0kBjRY2f7dvsbh07OnEjIez9ZAE7HJe5d4FyG3w2bDgFQYZRdXcFT\nEAkimBBHO8p2F3xsLVOIR2ovrX9QUoSA75349hnd0gnPKRV4TFe2rlvv5b8E\nMF8x\r\n=AJoN\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDeXql3Fm0wfZxlKC7dkVcXQZFcjV+bbYN5Qzdn2UMLOgIgEBoYyg61QLL5LZ4CDInJjgTkIsa/S/IwHwiSqSEBP/g="}]},"maintainers":[{"name":"fmal","email":"fmalinowski@gmail.com"}],"_npmUser":{"name":"fmal","email":"fmalinowski@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/http-service_3.0.5-1602948849571_1602948878941_0.2852015732911395"},"_hasShrinkwrap":false},"3.0.5":{"name":"@fmal/http-service","version":"3.0.5","description":"A HTTP service - orignally @cerebral/http","license":"UNLICENSED","keywords":["cerebral","cerebraljs","http"],"author":{"name":"Christian Alfoni","email":"christianalfoni@gmail.com"},"contributors":[{"name":"Filip Malinowski","email":"filip@fmal.me"}],"bugs":{"url":"https://github.com/fmal/monorepo/issues"},"repository":{"type":"git","url":"git+https://github.com/fmal/monorepo.git","directory":"packages/@fmal/http-service"},"publishConfig":{"access":"public"},"types":"dist/ts","main":"dist/cjs/index.js","module":"dist/es/index.js","sideEffects":false,"scripts":{"test":"jest","test:coverage":"npm test -- --coverage","lint":"eslint . --cache --fix --ext \".js,.ts\" --ignore-path ../../../.prettierignore","clean":"rimraf dist coverage ../../node_modules/@fmal/http-service","_babel":"babel src -x \".js,.ts\" --root-mode upward","prebuild":"npm run clean","copy:pkg":"cpy package.json ../../node_modules/@fmal/http-service && cpy factories/package.json ../../node_modules/@fmal/http-service/factories","copy:declarations":"cpy src/index.d.ts ../../node_modules/@fmal/http-service/dist/ts && cpy src/factories/index.d.ts ../../node_modules/@fmal/http-service/dist/ts/factories","postbuild":"run-p copy:*","build:cjs":"cross-env BABEL_ENV=cjs npm run _babel -- -d ../../node_modules/@fmal/http-service/dist/cjs","build:es":"cross-env BABEL_ENV=es npm run _babel -- -d ../../node_modules/@fmal/http-service/dist/es","build":"cross-env NODE_ENV=production run-p build:*","prepublishOnly":"rimraf dist && cpy \"@fmal/http-service/dist/**/*\" .. --cwd=../../node_modules --parents"},"dependencies":{"@babel/runtime":"7.7.7"},"devDependencies":{"@babel/cli":"7.7.7","cerebral":"5.2.0","cpy-cli":"2.0.0","cross-env":"6.0.3","eslint":"6.5.1","jest":"24.9.0","npm-run-all":"4.1.5","rimraf":"3.0.0","xhr-mock":"2.5.0"},"readme":"# @fmal/http-service\n\n[![npm](https://img.shields.io/npm/v/@fmal/http-service.svg?style=flat-square)](https://www.npmjs.com/package/@fmal/http-service)\n\nA HTTP service - originally `@cerebral/http`\n\n> Migrating from `@cerebral/http`? See the [migration guide](#migrating-from-cerebralhttp) at the bottom of this readme.\n\n## Install\n\n```\nnpm install @fmal/http-service\n```\n\n## Description\n\n`http-service` exposes the ability to do HTTP requests. It supports **cors** and file upload, with progress handling. It defaults to **json**, but you can configure it to whatever you want.\n\n`http-service` works great with [Cerebral](https://cerebraljs.com/) (with Cerebral-specific factories exposed) but the service itself (default export) does not depend on Cerebral, so you are free to use it in other contexts.\n\n```js\nimport { set } from 'cerebral/factories';\nimport { httpGet } from '@fmal/http-service/factories';\nimport { state, props, string } from 'cerebral';\n\nexport default [\n  httpGet(string`/items/${props`itemKey`}`),\n  set(state`app.currentItem`, props`result`)\n];\n```\n\nAll factories of HTTP service supports template tags.\n\n## Instantiate\n\n```js\nimport App, { Provider } from 'cerebral';\nimport HttpService from '@fmal/http-service';\n\nconst http = Provider(\n  HttpService({\n    // Prefix all requests with this url\n    baseUrl: 'https://api.github.com',\n\n    // Any default headers to pass on requests\n    headers: {\n      'Content-Type': 'application/json; charset=UTF-8',\n      Accept: 'application/json'\n    },\n\n    // When talking to cross origin (cors), pass cookies\n    // if set to true\n    withCredentials: false,\n\n    // Provide a global request timeout for all calls\n    // which can be overwritten for request by providing\n    // a different timeout when doing a request\n    // in actions or factories\n    timeout: 5000\n  })\n);\n\nconst app = App({\n  providers: { http }\n});\n```\n\nYou can update these default options in an action:\n\n```js\nfunction updateDefaultHttpOptions({ http }) {\n  http.updateOptions({\n    // Updated options\n  });\n}\n```\n\n## abort\n\nYou can abort any running request, causing the request to resolve as status code **0** and sets the type to **abort** on the error object.\n\n```js\nfunction searchItems({ props, path, http }) {\n  http.abort('/items*'); // regexp string\n  return http\n    .get(`/items?query=${props.query}`)\n    .then(path.success)\n    .catch(error => {\n      if (error.type === 'abort') {\n        return path.abort();\n      }\n\n      return path.error({ error });\n    });\n}\n\nexport default [\n  searchItems,\n  {\n    success: [],\n    error: [],\n    abort: []\n  }\n];\n```\n\n## cors\n\nCors has been turned into a \"black box\" by jQuery. Cors is actually a very simple concept, but due to a lot of confusion of \"Request not allowed\", **cors** has been an option to help out. In HttpService we try to give you the insight to understand how cors actually works.\n\nCors has nothing to do with the client. The only client configuration related to cors is the **withCredentials** option, which makes sure cookies are passed to the cross origin server. The only requirement for cors to work is that you pass the correct **Content-Type**. Now, this depends on the server in question. Some servers allows any content-type, others require a specific one. These are the typical ones:\n\n- text/plain\n- application/x-www-form-urlencoded\n- application/json; charset=UTF-8\n\nNote that this is only related to the **request**. If you want to define what you want as response, you set the **Accept** header, which is _application/json_ by default.\n\n## errors\n\n### HttpServiceError\n\n```js\nimport { HttpServiceError } from '@fmal/http-service';\n\n// Error structure\n{\n  name: 'HttpServiceError',\n  type: 'http | abort | timeout',\n  message: 'Some error message or responseText',\n  response: {\n    result: {}, // Parsed responseText\n    headers: {},\n    status: 200\n  },\n  stack: '...'\n}\n```\n\nThis error is available in the following scenarios:\n\n- Inside an action\n\n```js\nfunction someAction({ http }) {\n  return http.get('/something').catch(error => ...)\n}\n```\n\n- Going down an error path\n\n```js\n[\n  httpGet('/something'),\n  {\n    success: [],\n    error: [\n      // {error: ...}\n    ]\n  }\n];\n```\n\n- To module catch handlers\n\n```js\nconst errorCatched = [\n  // {error: ...}\n  displayError\n];\n\nconst module = {\n  catch: [[HttpServiceError, errorCatched]]\n};\n```\n\n## delete\n\n### action\n\n```js\nfunction someDeleteAction({ http }) {\n  const query = {};\n  const options = {};\n\n  return http\n    .delete('/items/1', query, options)\n    .then(response => {\n      return { response };\n    })\n    .catch(error => {\n      return { error };\n    });\n}\n```\n\n### factory\n\n```js\nimport { httpDelete } from '@fmal/http-service/factories';\nimport { state, string } from 'cerebral';\n\nexport default [\n  httpDelete(string`/items/${state`currentItemId`}`)\n  /*\n    PROPS: {\n      response: {...}\n    }\n  */\n];\n```\n\n### factory with paths\n\n```js\nimport { httpDelete } from '@cerebral/http/factories';\nimport { state, string } from 'cerebral';\n\nexport default [\n  httpDelete(string`/items/${state`currentItemId`}`),\n  {\n    success: [\n      /* PROPS: {response: {...}} */\n    ],\n    error: [\n      /* PROPS: {error: {...}} */\n    ],\n    abort: [\n      /* PROPS: {error: {...}} */\n    ],\n    timeout: [\n      /* PROPS: {error: {...}} */\n    ],\n\n    // Optionally any status code, ex. 404: []\n    '${STATUS_CODE}': [\n      /* PROPS: {response/error: {...}} */\n    ]\n  }\n];\n```\n\n## get\n\n### action\n\n```js\nfunction someGetAction({ http }) {\n  const query = {};\n  const options = {};\n\n  return http\n    .get('/items', query, options)\n    .then(response => {\n      return { someResponse: response };\n    })\n    .catch(error => {\n      return { someError: error };\n    });\n}\n```\n\n### factory\n\n```js\nimport { httpGet } from '@fmal/http-service/factories';\n\nexport default [\n  httpGet('/items')\n  /*\n    PROPS: {\n      response: {...}\n    }\n  */\n];\n```\n\nOn error this will throw to the signal or global catch handler.\n\n### factory with paths\n\n```js\nimport { httpGet } from '@fmal/http-service/factories';\n\nexport default [\n  httpGet('/items'),\n  {\n    success: [\n      /* PROPS: {response: {...}} */\n    ],\n    error: [\n      /* PROPS: {error: {...}} */\n    ],\n    abort: [\n      /* PROPS: {error: {...}} */\n    ],\n    timeout: [\n      /* PROPS: {error: {...}} */\n    ],\n\n    // Optionally any status code, ex. 404: []\n    '${STATUS_CODE}': [\n      /* PROPS: {response/error: {...}} */\n    ]\n  }\n];\n```\n\n## patch\n\n### action\n\n```js\nfunction somePatchAction({ http }) {\n  const data = {};\n  const options = {};\n\n  return http\n    .patch('/items/1', data, options)\n    .then(response => {\n      return { response };\n    })\n    .catch(error => {\n      return { error };\n    });\n}\n```\n\n### factory\n\n```js\nimport { httpPatch } from '@fmal/http-service/factories';\nimport { state, props, string } from 'cerebral';\n\nexport default [\n  httpPatch(string`/items/${props`itemId`}`, state`patchData`)\n  /*\n    PROPS: {\n      response: {...}\n    }\n  */\n];\n```\n\n### factory with paths\n\n```js\nimport { httpPatch } from '@fmal/http-service/factories';\nimport { state, props, string } from 'cerebral';\n\nexport default [\n  httpPatch(string`/items/${props`itemId`}`, state`patchData`),\n  {\n    success: [\n      /* PROPS: {response: {...}} */\n    ],\n    error: [\n      /* PROPS: {error: {...}} */\n    ],\n    abort: [\n      /* PROPS: {error: {...}} */\n    ],\n    timeout: [\n      /* PROPS: {error: {...}} */\n    ],\n\n    // Optionally any status code, ex. 404: []\n    '${STATUS_CODE}': [\n      /* PROPS: {response/error: {...}} */\n    ]\n  }\n];\n```\n\n## post\n\n### action\n\n```js\nfunction somePostAction({ http }) {\n  const data = {};\n  const options = {};\n\n  return http\n    .post('/items', data, options)\n    .then(response => {\n      return { response };\n    })\n    .catch(error => {\n      return { error };\n    });\n}\n```\n\n### factory\n\n```js\nimport { httpPost } from '@fmal/http-service/factories';\nimport { props } from 'cerebral';\n\nexport default [\n  httpPost('/items', {\n    title: props`itemTitle`,\n    foo: 'bar'\n  })\n  /*\n    PROPS: {\n      response: {...}\n    }\n  */\n];\n```\n\n### factory with paths\n\n```js\nimport { httpPost } from '@fmal/http-service/factories';\nimport { props } from 'cerebral';\n\nexport default [\n  httpPost('/items', {\n    title: props`itemTitle`,\n    foo: 'bar'\n  }),\n  {\n    success: [\n      /* PROPS: {response: {...}} */\n    ],\n    error: [\n      /* PROPS: {error: {...}} */\n    ],\n    abort: [\n      /* PROPS: {error: {...}} */\n    ],\n    timeout: [\n      /* PROPS: {error: {...}} */\n    ],\n\n    // Optionally any status code, ex. 404: []\n    '${STATUS_CODE}': [\n      /* PROPS: {response/error: {...}} */\n    ]\n  }\n];\n```\n\n## put\n\n### action\n\n```js\nfunction somePutAction({ http }) {\n  const data = {};\n  const options = {};\n\n  return http\n    .put('/items/1', data, options)\n    .then(response => {\n      return { response };\n    })\n    .catch(error => {\n      return { error };\n    });\n}\n```\n\n### factory\n\n```js\nimport { httpPut } from '@fmal/http-service/factories';\n\nexport default [\n  httpPut('/items', {\n    // data object\n  })\n  /*\n    PROPS: {\n      response: {...}\n    }\n  */\n];\n```\n\n### factory with paths\n\n```js\nimport { httpPut } from '@fmal/http-service/factories';\n\nexport default [\n  httpPut('/items', {\n    // data object\n  }),\n  {\n    success: [\n      /* PROPS: {response: {...}} */\n    ],\n    error: [\n      /* PROPS: {error: {...}} */\n    ],\n    abort: [\n      /* PROPS: {error: {...}} */\n    ],\n    timeout: [\n      /* PROPS: {error: {...}} */\n    ],\n\n    // Optionally any status code, ex. 404: []\n    '${STATUS_CODE}': [\n      /* PROPS: {response/error: {...}} */\n    ]\n  }\n];\n```\n\n## responses\n\nThere are two types of responses from the HTTP service. A **response** and an **error** of type _HttpServiceError_. A **response** will be received on status codes 200-299. Everything else is an **error**.\n\n### response\n\n```js\n{\n  result: 'the response body',\n  headers: {...},\n  status: 200\n}\n```\n\n### error\n\n```js\n{\n  name: 'HttpServiceError',\n  type: 'http | abort | timeout',\n  message: 'Some potential error message',\n  result: 'Message or response body',\n  status: 500,\n  headers: {},\n  stack: '...'\n}\n```\n\n## request\n\n```js\nfunction someGetAction ({http}) {\n  return http.request({\n    // Any http method\n    method: 'GET',\n\n    // Url you want to request to\n    url: '/items'\n\n    // Request body as object. Will automatically be stringified if json and\n    // urlEncoded if application/x-www-form-urlencoded\n    body: {},\n\n    // Query as object, will automatically be urlEncoded\n    query: {},\n\n    // If cross origin request, pass cookies\n    withCredentials: false,\n\n    // Any additional http headers, or overwrite default\n    headers: {},\n\n    // A function or signal path (foo.bar.requestProgressed) that\n    // triggers on request progress. Passes {progress: 45} etc.\n    onProgress: null\n  })\n}\n```\n\n## uploadFile\n\n### action\n\n```js\nfunction someDeleteAction({ http, props }) {\n  return http\n    .uploadFile('/upload', props.files, {\n      name: 'filename.png', // Default to \"files\"\n      data: {}, // Additional form data\n      headers: {},\n      onProgress: 'some.signal.path' // Upload progress\n    })\n    .then(response => {\n      return { response };\n    })\n    .catch(error => {\n      return { error };\n    });\n}\n```\n\n### factory\n\n```js\nimport { httpUploadFile } from '@fmal/http-service/factories';\nimport { state, props } from 'cerebral';\n\nexport default [\n  httpUploadFile('/uploads', props`file`, {\n    name: state`currentFileName`\n  }),\n  {\n    success: [\n      /* PROPS: {response: {...}} */\n    ],\n    error: [\n      /* PROPS: {error: {...}} */\n    ],\n    abort: [\n      /* PROPS: {error: {...}} */\n    ],\n\n    // Optionally any status code, ex. 404: []\n    '${STATUS_CODE}': [\n      /* PROPS: {response/error: {...}} */\n    ]\n  }\n];\n```\n\n### factory with paths\n\n```js\nimport { httpUploadFile } from '@fmal/http-service/factories';\nimport { state, props } from 'cerebral/tags';\n\nexport default [\n  httpUploadFile('/uploads', props`file`, {\n    name: state`currentFileName`\n  })\n  /*\n    PROPS: {\n      response: {...}\n    }\n  */\n];\n```\n\n## Migrating from @cerebral/http\n\nSince `http-service` does not depend on Cerebral it does not use `Provider`, but you can wrap `http-service` in `Provider` for the same effect:\n\n```diff\n-import { Controller, Module } from 'cerebral';\n-import HttpProvider from '@cerebral/http';\n+import App, { Provider } from 'cerebral';\n+import HttpService from '@fmal/http-service';\n\n-export default Controller(\n-  Module({\n-    providers: {\n-      http: HttpProvider({})\n-    }\n-  })\n-);\n+export default App({\n+  providers: {\n+    http: Provider(HttpService({}))\n+  }\n+});\n```\n\n`http-service` uses `HttpServiceError` error instead of `HttpProviderError`:\n\n```diff\n-import { HttpProviderError } from '@cerebral/http';\n+import { HttpServiceError } from '@fmal/http-service';\n```\n\n“operators” are changed with “factories”, to follow the naming introduced in Cerebral 5.0.\nFactories are exported under `@fmal/http-service/factories` and they are optional, meaning if you're\nusing `http-service` outside Cerebral app, you don't have to import (and thus bundle) them in your codebase.\n\n```diff\n-import { httpGet } from '@cerebral/http/operators';\n+import { httpGet } from '@fmal/http-service/factories';\n```\n","readmeFilename":"README.md","homepage":"https://github.com/fmal/monorepo#readme","_id":"@fmal/http-service@3.0.5","_nodeVersion":"10.22.1","_npmVersion":"6.14.6","dist":{"integrity":"sha512-zsoSBUP5cRM7UT4kuunN4dZqhkgWd0xgYFSWXsc3zRfgcyAan7mI6AiMLzwc/BzQbb7uolaEgnhbOZk+Rf0UPQ==","shasum":"2bf3f28667df5dda90578490c5606138fb0302d6","tarball":"https://registry.npmjs.org/@fmal/http-service/-/http-service-3.0.5.tgz","fileCount":53,"unpackedSize":76647,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfixCZCRA9TVsSAnZWagAAaFAP/2E49aw3EfmkmojyL8CP\ndhI0b59sNNopxkW3k002TNuQGN8xdH8DXr+QaI3jvceYiFnXYgGCwwGblOQR\nfPv4EhF58bdfGYUi+Qyo/m1JjrK1qyQyWQJQswiq4JuNkv+WfhXkIkpG37K/\nfzcIRQii1zUvSZT8iSgmYNu5aPMd9oBpk0Tq+jcWnSLkaxULyApPUhhG1oMc\n7hw7RX1V66vzwzAcs3QhOz+rOnbGSNbwG9aiwXkxSMMwXp2zzRteXObWhGm2\n9ih2hOVGUWx9pxzQAHMsVPrheY8qmKcgxklAqyErpaBlXqkssf/YZbcaWep9\nOzR4hwTObscAG8PErIy0119qbz9qvhX4LHcLaOKLgpRKcae+WFaZZLWnyGZN\nOESS4UeechoaVYwoMfNPZjB3QTatHgrE2OmAGPZYZljiCw4+8r/yIRycbQzV\nfHvTA/V4SWhB322sZYIVP3hh7p3n9iU2v6Q+S61MJ0FwTz4mxXferUbXZrHt\ncKupg5ehO+0FPDQWeX6emPKm/UV7tlL8W+csVuQaoV3EsX8e5HXNNfPjd9ME\nlEFH5dlDXl3cGTaIV2awPRNI23Sw4OEY0ovlhkkZX7nBeDUWNmbAhJ0wVDKE\nlceNLhSHXMAquMS9NKRsREV6KO1ii9D0BAfGe3OYy5TUeOdyISqr6lFEWihV\n/Bz+\r\n=rbRc\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCLHUDLoAS7K+C/Pnn7B0R5Xemxxvv8jtt5/IiplJ66CwIgUPWIXTpUJydFqkVakNenZkzF38cF0xlbqTegv987LEA="}]},"maintainers":[{"name":"fmal","email":"fmalinowski@gmail.com"}],"_npmUser":{"name":"fmal","email":"fmalinowski@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/http-service_3.0.5_1602949273210_0.25107873435485417"},"_hasShrinkwrap":false}},"time":{"created":"2018-11-12T22:20:46.451Z","1.0.0":"2018-11-12T22:20:46.849Z","modified":"2022-04-05T11:33:25.824Z","1.0.1":"2018-11-14T22:19:32.032Z","2.0.0":"2019-10-09T17:14:32.867Z","3.0.0-1570641533483":"2019-10-09T17:19:03.712Z","2.0.1":"2019-10-11T14:06:58.030Z","3.0.0":"2019-10-11T14:11:08.913Z","3.0.1":"2019-10-12T07:26:37.888Z","3.0.2":"2019-10-12T08:25:05.757Z","3.0.3-1571135102741":"2019-10-15T10:25:30.330Z","3.0.3":"2019-10-15T10:29:16.379Z","3.0.4-1577985485537":"2020-01-02T17:18:34.101Z","3.0.4":"2020-01-02T17:21:42.953Z","3.0.5-1602948849571":"2020-10-17T15:34:39.108Z","3.0.5":"2020-10-17T15:41:13.369Z"},"maintainers":[{"name":"fmal","email":"fmalinowski@gmail.com"}],"description":"A HTTP service - orignally @cerebral/http","homepage":"https://github.com/fmal/monorepo#readme","keywords":["cerebral","cerebraljs","http"],"repository":{"type":"git","url":"git+https://github.com/fmal/monorepo.git","directory":"packages/@fmal/http-service"},"contributors":[{"name":"Filip Malinowski","email":"filip@fmal.me"}],"author":{"name":"Christian Alfoni","email":"christianalfoni@gmail.com"},"bugs":{"url":"https://github.com/fmal/monorepo/issues"},"license":"UNLICENSED","readme":"","readmeFilename":""}