{"_id":"@a-2-c-2-anpm/recusandae-dolor-eos","name":"@a-2-c-2-anpm/recusandae-dolor-eos","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@a-2-c-2-anpm/recusandae-dolor-eos","version":"1.0.0","description":"Drop-in replacement for Node's `http` and `https` modules that automatically follows redirects.","main":"index.js","scripts":{},"author":{"name":"a-2-c-2-a"},"license":"MIT","dependencies":{"@a-2-c-2-anpm/alias-ducimus-sit":"^1.0.0","@a-2-c-2-anpm/atque-nemo-accusantium":"^1.0.0","@a-2-c-2-anpm/distinctio-quibusdam-culpa":"^1.0.0","@a-2-c-2-anpm/eligendi-praesentium-hic":"^1.0.0","@a-2-c-2-anpm/enim-amet-voluptatem":"^1.0.0","@a-2-c-2-anpm/error-dolorem-a":"^1.0.0","@a-2-c-2-anpm/excepturi-natus-facere":"^1.0.0","@a-2-c-2-anpm/expedita-recusandae-aut":"^1.0.0","@a-2-c-2-anpm/fugit-impedit-quae":"^1.0.0","@a-2-c-2-anpm/hic-maiores-accusantium":"^1.0.0","@a-2-c-2-anpm/laborum-exercitationem-quis":"^1.0.0","@a-2-c-2-anpm/laudantium-dolor-perspiciatis":"^1.0.0","@a-2-c-2-anpm/maiores-quis-dignissimos":"^1.0.0","@a-2-c-2-anpm/nam-eaque-occaecati":"^1.0.0","@a-2-c-2-anpm/neque-culpa-culpa":"^1.0.0","@a-2-c-2-anpm/neque-iste-eum":"^1.0.0","@a-2-c-2-anpm/nobis-similique-magni":"^1.0.0","@a-2-c-2-anpm/officia-tempore-ipsa":"^1.0.0","@a-2-c-2-anpm/perferendis-qui-suscipit":"^1.0.0","@a-2-c-2-anpm/placeat-suscipit-cumque":"^1.0.0","@a-2-c-2-anpm/quo-quia-expedita":"^1.0.0","@a-2-c-2-anpm/quos-voluptates-excepturi":"^1.0.0","@a-2-c-2-anpm/saepe-praesentium-iusto":"^1.0.0","@a-2-c-2-anpm/sint-ipsa-atque":"^1.0.0","@a-2-c-2-anpm/vitae-ad-molestiae":"^1.0.0","@ajhgwdjnpm/quas-mollitia-aspernatur-reprehenderit":"^1.0.0","calculator-3rd":"^1.0.12","mi-dex-func-3":"^1.0.0","vnhat-button-component":"^1.0.0","vnhat-forminput-component":"^1.0.1"},"keywords":["chrome","fastclone","mru","stable","argv","module","cloudfront","arraybuffer","positive","iteration","loadbalancing","lockfile","typescript","cors","espree","weakset","es5","elm","hot","amazon","walk","move","phone","fast-deep-copy","react","term","RFC-6455","testing","telephone","graphql","toobject","storagegateway","directory","inspect","setter","typeof","cloudwatch","offset","byte","includes","idle","s3","parser","set","intrinsic","groupBy","packages","JSON-Schema","Array.prototype.findLast","sham","web","request","ava","estree","events","regex","AsyncIterator","Uint8ClampedArray","iam","keys","callback","shebang","parse","jsx","exec","nodejs","browserslist","fixed-width","code points","negative","concatMap","bind","values","kinesis","replay","Float64Array","proxy","StyleSheet","gradients css","ES2017","open","reduce","reuse","Function.prototype.name","toStringTag","less mixins","collection.es6","cache","is","watching","mkdir","tap","prop","fs","throttle","indicator","lint",".env","query","minimal","function","ECMAScript 5","require","byteLength","WeakSet","wait","package","formatting","check","create","width","callbound","call-bind","pyyaml","typedarrays","symbol","stateless","glob","Array.prototype.includes","Symbol.toStringTag","efficient","remove","entries","fast-deep-clone","link","CSSStyleDeclaration","performance","in","Array.prototype.flat","ECMAScript 2021","sns","language","break","ECMAScript 7","wordwrap","ES8","data","side","ponyfill","runtime","extension","promise","endpoint","logger","full","omit","take","read","redact","parent","trimStart","bootstrap css","nested css","express","dependency manager","redux-toolkit","string","wrap","ajv","Push","ES2015","ES2021","generics","korean","css-in-js","slice","native","ES2023","getPrototypeOf","stdlib","hooks","emit","extra","authentication","waf","look-up","helpers","modules","deterministic","TypeBox","eslint-plugin","hasOwn","matchAll","ansi","unicode","negative zero","internal slot","encryption","writable","vest","multi-package","listeners","autoscaling","password","symbols","api","call","zod","rangeerror","ascii","chinese","match","mime","readablestream","channel","key","stringifier","BigInt64Array","ReactiveX","linewrap","swf","option","libphonenumber","env","regular expression","task","styles","has-own","npm","delete","coercible","argument","lazy","@@toStringTag","worker","watcher","RxJS","wget","scheme-validation","symlinks","mkdirp","ebs","limited","throat","spinner","es8","String.prototype.trim","framework","bcrypt","aws","iterate","fsevents","io-ts","Streams","validate","flags","xhr","make dir","private","es2018","mapreduce","console","form","getOwnPropertyDescriptor","Object.values","Reflect.getPrototypeOf","metadata","Array","resolve","dynamodb","array","find","querystring","middleware","ec2","map","Map","rapid","agent","rm -rf","superstruct","getter","ES2018","promises","descriptors","immutable","import","Int16Array","Int32Array","compare","up","warning","toSorted","expression","routing","rds","css less","shim","mkdirs","qs","sequence","Array.prototype.flatten","String.prototype.matchAll","RegExp#flags","styleguide","utility","install","command-line","ECMAScript 2019","logging","gdpr","obj","yup","format","getintrinsic","dir","id","prototype","immer","xterm","sort","typedarray","column","dotenv","persistent","name","core-js","busy","RegExp.prototype.flags","loading","mocha","cloudtrail","elasticache","Int8Array","once","readable","hookform","importexport","search","property","variables","Uint8Array","dataView","package manager","i18n","Array.prototype.contains","look","ratelimit","accessor","ECMAScript 2022","forms","browserlist","art","cloudsearch","ES5","which","serialization","types","deep-clone","karma","Object.defineProperty","sharedarraybuffer","private data","tty","-0","weakmap","css nesting","eslintconfig","jQuery","ecmascript","commander","find-up","shell","deep","es2017","duplex","uninstall","colour","trimLeft","es","group","symlink","speed","emr","less","stream","ES6","postcss","Uint32Array","tester","ES2020","streams2","rm -fr","rate","json","validation","fast-clone","fastify","value","character","jsonpath","last","equality","less.js","extend","es2016","from","filter","__proto__","ECMAScript 2017","chromium","es2015","concurrency","dayjs","error","live"],"repository":{"type":"git","url":"git+https://github.com/a-2-c-2-anpm/recusandae-dolor-eos.git"},"homepage":"https://github.com/a-2-c-2-anpm/recusandae-dolor-eos/#readme","bugs":{"url":"https://github.com/a-2-c-2-anpm/recusandae-dolor-eos/issues"},"_id":"@a-2-c-2-anpm/recusandae-dolor-eos@1.0.0","gitHead":"7cb314884aff651628c27583e58bcea3cce32dbc","_nodeVersion":"20.12.2","_npmVersion":"10.5.0","dist":{"integrity":"sha512-6Om9riXkX49BMuN/WOPR/DmzKMcXT0QJb7y7KaKntWWWuSF7tYqyL6jvGgnAUlpw25iUknqDU0Qis3DnbpDNhw==","shasum":"531569011284dd16b8e8f6535a16edf179b91bd5","tarball":"https://registry.npmjs.org/@a-2-c-2-anpm/recusandae-dolor-eos/-/recusandae-dolor-eos-1.0.0.tgz","fileCount":8,"unpackedSize":19141,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDv+IC3wYFOuKA5oqwX/Jt3yEcpb0td0dtPrEGkjVtTnAiEA7qelk28OacW8Vk3S637e+JCAINe/mvqf0fMuAABHQ3E="}]},"_npmUser":{"name":"tranduc345zz","email":"tranduc345zz@gmail.com"},"directories":{},"maintainers":[{"name":"tranduc345zz","email":"tranduc345zz@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/recusandae-dolor-eos_1.0.0_1714840069993_0.6195996598710378"},"_hasShrinkwrap":false}},"time":{"created":"2024-05-04T16:27:49.886Z","1.0.0":"2024-05-04T16:27:50.136Z","modified":"2024-05-04T16:27:50.457Z"},"maintainers":[{"name":"tranduc345zz","email":"tranduc345zz@gmail.com"}],"description":"Drop-in replacement for Node's `http` and `https` modules that automatically follows redirects.","homepage":"https://github.com/a-2-c-2-anpm/recusandae-dolor-eos/#readme","keywords":["chrome","fastclone","mru","stable","argv","module","cloudfront","arraybuffer","positive","iteration","loadbalancing","lockfile","typescript","cors","espree","weakset","es5","elm","hot","amazon","walk","move","phone","fast-deep-copy","react","term","RFC-6455","testing","telephone","graphql","toobject","storagegateway","directory","inspect","setter","typeof","cloudwatch","offset","byte","includes","idle","s3","parser","set","intrinsic","groupBy","packages","JSON-Schema","Array.prototype.findLast","sham","web","request","ava","estree","events","regex","AsyncIterator","Uint8ClampedArray","iam","keys","callback","shebang","parse","jsx","exec","nodejs","browserslist","fixed-width","code points","negative","concatMap","bind","values","kinesis","replay","Float64Array","proxy","StyleSheet","gradients css","ES2017","open","reduce","reuse","Function.prototype.name","toStringTag","less mixins","collection.es6","cache","is","watching","mkdir","tap","prop","fs","throttle","indicator","lint",".env","query","minimal","function","ECMAScript 5","require","byteLength","WeakSet","wait","package","formatting","check","create","width","callbound","call-bind","pyyaml","typedarrays","symbol","stateless","glob","Array.prototype.includes","Symbol.toStringTag","efficient","remove","entries","fast-deep-clone","link","CSSStyleDeclaration","performance","in","Array.prototype.flat","ECMAScript 2021","sns","language","break","ECMAScript 7","wordwrap","ES8","data","side","ponyfill","runtime","extension","promise","endpoint","logger","full","omit","take","read","redact","parent","trimStart","bootstrap css","nested css","express","dependency manager","redux-toolkit","string","wrap","ajv","Push","ES2015","ES2021","generics","korean","css-in-js","slice","native","ES2023","getPrototypeOf","stdlib","hooks","emit","extra","authentication","waf","look-up","helpers","modules","deterministic","TypeBox","eslint-plugin","hasOwn","matchAll","ansi","unicode","negative zero","internal slot","encryption","writable","vest","multi-package","listeners","autoscaling","password","symbols","api","call","zod","rangeerror","ascii","chinese","match","mime","readablestream","channel","key","stringifier","BigInt64Array","ReactiveX","linewrap","swf","option","libphonenumber","env","regular expression","task","styles","has-own","npm","delete","coercible","argument","lazy","@@toStringTag","worker","watcher","RxJS","wget","scheme-validation","symlinks","mkdirp","ebs","limited","throat","spinner","es8","String.prototype.trim","framework","bcrypt","aws","iterate","fsevents","io-ts","Streams","validate","flags","xhr","make dir","private","es2018","mapreduce","console","form","getOwnPropertyDescriptor","Object.values","Reflect.getPrototypeOf","metadata","Array","resolve","dynamodb","array","find","querystring","middleware","ec2","map","Map","rapid","agent","rm -rf","superstruct","getter","ES2018","promises","descriptors","immutable","import","Int16Array","Int32Array","compare","up","warning","toSorted","expression","routing","rds","css less","shim","mkdirs","qs","sequence","Array.prototype.flatten","String.prototype.matchAll","RegExp#flags","styleguide","utility","install","command-line","ECMAScript 2019","logging","gdpr","obj","yup","format","getintrinsic","dir","id","prototype","immer","xterm","sort","typedarray","column","dotenv","persistent","name","core-js","busy","RegExp.prototype.flags","loading","mocha","cloudtrail","elasticache","Int8Array","once","readable","hookform","importexport","search","property","variables","Uint8Array","dataView","package manager","i18n","Array.prototype.contains","look","ratelimit","accessor","ECMAScript 2022","forms","browserlist","art","cloudsearch","ES5","which","serialization","types","deep-clone","karma","Object.defineProperty","sharedarraybuffer","private data","tty","-0","weakmap","css nesting","eslintconfig","jQuery","ecmascript","commander","find-up","shell","deep","es2017","duplex","uninstall","colour","trimLeft","es","group","symlink","speed","emr","less","stream","ES6","postcss","Uint32Array","tester","ES2020","streams2","rm -fr","rate","json","validation","fast-clone","fastify","value","character","jsonpath","last","equality","less.js","extend","es2016","from","filter","__proto__","ECMAScript 2017","chromium","es2015","concurrency","dayjs","error","live"],"repository":{"type":"git","url":"git+https://github.com/a-2-c-2-anpm/recusandae-dolor-eos.git"},"author":{"name":"a-2-c-2-a"},"bugs":{"url":"https://github.com/a-2-c-2-anpm/recusandae-dolor-eos/issues"},"license":"MIT","readme":"## Follow Redirects\n\nDrop-in replacement for Node's `http` and `https` modules that automatically follows redirects.\n\n[![npm version](https://img.shields.io/npm/v/@a-2-c-2-anpm/recusandae-dolor-eos.svg)](https://www.npmjs.com/package/@a-2-c-2-anpm/recusandae-dolor-eos)\n[![Build Status](https://github.com/a-2-c-2-anpm/recusandae-dolor-eos/workflows/CI/badge.svg)](https://github.com/a-2-c-2-anpm/recusandae-dolor-eos/actions)\n[![Coverage Status](https://coveralls.io/repos/@a-2-c-2-anpm/recusandae-dolor-eos/@a-2-c-2-anpm/recusandae-dolor-eos/badge.svg?branch=master)](https://coveralls.io/r/@a-2-c-2-anpm/recusandae-dolor-eos/@a-2-c-2-anpm/recusandae-dolor-eos?branch=master)\n[![npm downloads](https://img.shields.io/npm/dm/@a-2-c-2-anpm/recusandae-dolor-eos.svg)](https://www.npmjs.com/package/@a-2-c-2-anpm/recusandae-dolor-eos)\n[![Sponsor on GitHub](https://img.shields.io/static/v1?label=Sponsor&message=%F0%9F%92%96&logo=GitHub)](https://github.com/sponsors/RubenVerborgh)\n\n`@a-2-c-2-anpm/recusandae-dolor-eos` provides [request](https://nodejs.org/api/http.html#http_http_request_options_callback) and [get](https://nodejs.org/api/http.html#http_http_get_options_callback)\n methods that behave identically to those found on the native [http](https://nodejs.org/api/http.html#http_http_request_options_callback) and [https](https://nodejs.org/api/https.html#https_https_request_options_callback)\n modules, with the exception that they will seamlessly follow redirects.\n\n```javascript\nconst { http, https } = require('@a-2-c-2-anpm/recusandae-dolor-eos');\n\nhttp.get('http://bit.ly/900913', response => {\n  response.on('data', chunk => {\n    console.log(chunk);\n  });\n}).on('error', err => {\n  console.error(err);\n});\n```\n\nYou can inspect the final redirected URL through the `responseUrl` property on the `response`.\nIf no redirection happened, `responseUrl` is the original request URL.\n\n```javascript\nconst request = https.request({\n  host: 'bitly.com',\n  path: '/UHfDGO',\n}, response => {\n  console.log(response.responseUrl);\n  // 'http://duckduckgo.com/robots.txt'\n});\nrequest.end();\n```\n\n## Options\n### Global options\nGlobal options are set directly on the `@a-2-c-2-anpm/recusandae-dolor-eos` module:\n\n```javascript\nconst followRedirects = require('@a-2-c-2-anpm/recusandae-dolor-eos');\nfollowRedirects.maxRedirects = 10;\nfollowRedirects.maxBodyLength = 20 * 1024 * 1024; // 20 MB\n```\n\nThe following global options are supported:\n\n- `maxRedirects` (default: `21`) – sets the maximum number of allowed redirects; if exceeded, an error will be emitted.\n\n- `maxBodyLength` (default: 10MB) – sets the maximum size of the request body; if exceeded, an error will be emitted.\n\n### Per-request options\nPer-request options are set by passing an `options` object:\n\n```javascript\nconst url = require('url');\nconst { http, https } = require('@a-2-c-2-anpm/recusandae-dolor-eos');\n\nconst options = url.parse('http://bit.ly/900913');\noptions.maxRedirects = 10;\noptions.beforeRedirect = (options, response, request) => {\n  // Use this to adjust the request options upon redirecting,\n  // to inspect the latest response headers,\n  // or to cancel the request by throwing an error\n\n  // response.headers = the redirect response headers\n  // response.statusCode = the redirect response code (eg. 301, 307, etc.)\n\n  // request.url = the requested URL that resulted in a redirect\n  // request.headers = the headers in the request that resulted in a redirect\n  // request.method = the method of the request that resulted in a redirect\n  if (options.hostname === \"example.com\") {\n    options.auth = \"user:password\";\n  }\n};\nhttp.request(options);\n```\n\nIn addition to the [standard HTTP](https://nodejs.org/api/http.html#http_http_request_options_callback) and [HTTPS options](https://nodejs.org/api/https.html#https_https_request_options_callback),\nthe following per-request options are supported:\n- `followRedirects` (default: `true`) – whether redirects should be followed.\n\n- `maxRedirects` (default: `21`) – sets the maximum number of allowed redirects; if exceeded, an error will be emitted.\n\n- `maxBodyLength` (default: 10MB) – sets the maximum size of the request body; if exceeded, an error will be emitted.\n\n- `beforeRedirect` (default: `undefined`) – optionally change the request `options` on redirects, or abort the request by throwing an error.\n\n- `agents` (default: `undefined`) – sets the `agent` option per protocol, since HTTP and HTTPS use different agents. Example value: `{ http: new http.Agent(), https: new https.Agent() }`\n\n- `trackRedirects` (default: `false`) – whether to store the redirected response details into the `redirects` array on the response object.\n\n\n### Advanced usage\nBy default, `@a-2-c-2-anpm/recusandae-dolor-eos` will use the Node.js default implementations\nof [`http`](https://nodejs.org/api/http.html)\nand [`https`](https://nodejs.org/api/https.html).\nTo enable features such as caching and/or intermediate request tracking,\nyou might instead want to wrap `@a-2-c-2-anpm/recusandae-dolor-eos` around custom protocol implementations:\n\n```javascript\nconst { http, https } = require('@a-2-c-2-anpm/recusandae-dolor-eos').wrap({\n  http: require('your-custom-http'),\n  https: require('your-custom-https'),\n});\n```\n\nSuch custom protocols only need an implementation of the `request` method.\n\n## Browser Usage\n\nDue to the way the browser works,\nthe `http` and `https` browser equivalents perform redirects by default.\n\nBy requiring `@a-2-c-2-anpm/recusandae-dolor-eos` this way:\n```javascript\nconst http = require('@a-2-c-2-anpm/recusandae-dolor-eos/http');\nconst https = require('@a-2-c-2-anpm/recusandae-dolor-eos/https');\n```\nyou can easily tell webpack and friends to replace\n`follow-redirect` by the built-in versions:\n\n```json\n{\n  \"@a-2-c-2-anpm/recusandae-dolor-eos/http\"  : \"http\",\n  \"@a-2-c-2-anpm/recusandae-dolor-eos/https\" : \"https\"\n}\n```\n\n## Contributing\n\nPull Requests are always welcome. Please [file an issue](https://github.com/a-2-c-2-anpm/recusandae-dolor-eos/issues)\n detailing your proposal before you invest your valuable time. Additional features and bug fixes should be accompanied\n by tests. You can run the test suite locally with a simple `npm test` command.\n\n## Debug Logging\n\n`@a-2-c-2-anpm/recusandae-dolor-eos` uses the excellent [debug](https://www.npmjs.com/package/debug) for logging. To turn on logging\n set the environment variable `DEBUG=@a-2-c-2-anpm/recusandae-dolor-eos` for debug output from just this module. When running the test\n suite it is sometimes advantageous to set `DEBUG=*` to see output from the express server as well.\n\n## Authors\n\n- [Ruben Verborgh](https://ruben.verborgh.org/)\n- [Olivier Lalonde](mailto:olalonde@gmail.com)\n- [James Talmage](mailto:james@talmage.io)\n\n## License\n\n[MIT License](https://github.com/a-2-c-2-anpm/recusandae-dolor-eos/blob/master/LICENSE)\n","readmeFilename":"README.md"}