{"_id":"@atomictech/httpie","name":"@atomictech/httpie","dist-tags":{"latest":"1.10.0"},"versions":{"1.10.0":{"name":"@atomictech/httpie","version":"1.10.0","description":"Fork of MyUnisoft Node.js HTTP client that use Undici client","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"build":"tsc","prepublishOnly":"npm run build","test":"jest"},"repository":{"type":"git","url":"git+https://github.com/atomictech/httpie.git"},"engines":{"node":">=14"},"keywords":[],"publishConfig":{"@atomictech:registry":"https://registry.npmjs.org/"},"author":{"name":"GENTILHOMME Thomas","email":"gentilhomme.thomas@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/atomictech/httpie/issues"},"homepage":"https://github.com/atomictech/httpie#readme","devDependencies":{"@nodesecure/eslint-config":"^1.5.0","@slimio/is":"^1.5.1","@types/content-type":"^1.1.5","@types/jest":"^27.5.1","@types/lru-cache":"^7.10.10","@types/node":"^18.11.11","@types/statuses":"^2.0.0","dotenv":"^16.0.3","fastify":"^4.10.2","jest":"^27.5.1","p-ratelimit":"^1.0.1","ts-jest":"^27.1.4","typescript":"^4.9.3"},"dependencies":{"content-type":"^1.0.4","lru-cache":"^7.14.1","statuses":"^2.0.1","undici":"^5.21.0"},"gitHead":"c13ececdaa761c158252afd3f898d7b732354456","_id":"@atomictech/httpie@1.10.0","_nodeVersion":"16.18.1","_npmVersion":"8.19.2","dist":{"integrity":"sha512-AsU2gjyFhIE4NuBNEbzTDJDbuGC0P0CrlbsNUMkEomIzTkBUpfeuJJYJh4ewM3tnVOhpP4a9RDZKvU1QyQoA7A==","shasum":"aebb33002bc674f01633e96d566afd23dbf5cbb0","tarball":"https://registry.npmjs.org/@atomictech/httpie/-/httpie-1.10.0.tgz","fileCount":33,"unpackedSize":53616,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDlDgCl1lmf9GKZTJP7mLcc4pFAyXbBmTGTJnvqbxhWHgIhAIcBFl2Op3MEX8f0bZlt6CVrEMsqDgn+Wc3/SHp0Xdun"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkHcdhACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqeRhAAj+uKTJbQAhteoTS5BvrXniJ4LPuTB+3QqHUUjyxSi37xteGt\r\nfoAe4sREsfWnT3Y4hegNF81zQbGAbTLSEi8xWR1BRouT0PCXr3vJXOiS/pFW\r\nxMXPzvSf3ZpiYARkt5bKeEdMA+xp2h/v71X9u6QbHiE8K2xYqZXZ73yO0HvN\r\nl2gDMlwqztzSsGK01epLQIXxdWmUip+eWRg0DyvLG4gZ27VYPhgvpbepi9eH\r\nnRIUmXClZKKEkoJoEwVRzvhS5OwFfo/JkUmk1BZrpOdLoqbppbkR2Sl6KB3g\r\nOkBAoXyWrlc9YW4CPuvw/TcKcExwkY8iF8r529j0AuQHC85+3CrVJ/bN0mCn\r\nESg4BtHlFN6xWcdrgQ+vvQi2u59MUgLGBBvFa71lJ+7+adUK4sndCLbOf3Dg\r\nIblUFjPYYYvbUOOTfSRHs1XMp/wEc8inytWGDXdmgeYcVMDlp10eQB59bt/o\r\n+bcDH/ILNZw8plozafeeoSLD3Ntsez2lM6JlwxBEfgnY1lve8SVOL5l7T5L/\r\nnbe9KaXRi3MjZtcyX5dOq65mznXTYSRSEf44/tpaA2C754p/8uT2pzDEZbOu\r\nYogaWof/WHdJFM+SK/IKoTR7fEDvragsqn6HYcR/0mCnJgovxDaBD0rhheq6\r\ntRW/JZg8Ge0EbZr30DhUgFBhm1w7Ek3WokM=\r\n=dzJ4\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"jule-","email":"jule.createrocks@gmail.com"},"directories":{},"maintainers":[{"name":"chabou-san","email":"chabou@live.com"},{"name":"jule-","email":"jule.createrocks@gmail.com"},{"name":"typedef","email":"yann.torres@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/httpie_1.10.0_1679673185113_0.31838862350142105"},"_hasShrinkwrap":false}},"time":{"created":"2023-03-24T15:53:04.991Z","1.10.0":"2023-03-24T15:53:05.462Z","modified":"2023-03-24T15:53:05.670Z"},"maintainers":[{"name":"chabou-san","email":"chabou@live.com"},{"name":"jule-","email":"jule.createrocks@gmail.com"},{"name":"typedef","email":"yann.torres@gmail.com"}],"description":"Fork of MyUnisoft Node.js HTTP client that use Undici client","homepage":"https://github.com/atomictech/httpie#readme","keywords":[],"repository":{"type":"git","url":"git+https://github.com/atomictech/httpie.git"},"author":{"name":"GENTILHOMME Thomas","email":"gentilhomme.thomas@gmail.com"},"bugs":{"url":"https://github.com/atomictech/httpie/issues"},"license":"MIT","readme":"\n<p align=\"center\"><h1 align=\"center\">\n  Httpie (fork from MyUnisoft)\n</h1>\n\n<p align=\"center\">\n  A modern and light Node.js http client 🐢🚀.\n</p>\n\n<p align=\"center\">\n    <a href=\"https://github.com/MyUnisoft/httpie\">\n      <img src=\"https://img.shields.io/github/package-json/v/MyUnisoft/httpie?style=flat-square\" alt=\"npm version\">\n    </a>\n    <a href=\"https://github.com/MyUnisoft/httpie\">\n      <img src=\"https://img.shields.io/github/license/MyUnisoft/httpie?style=flat-square\" alt=\"license\">\n    </a>\n    <a href=\"https://api.securityscorecards.dev/projects/github.com/MyUnisoft/httpie\">\n      <img src=\"https://api.securityscorecards.dev/projects/github.com/MyUnisoft/httpie/badge\" alt=\"ossf scorecard\">\n    </a>\n    <a href=\"https://github.com/MyUnisoft/httpie/actions?query=workflow%3A%22Node.js+CI%22\">\n      <img src=\"https://img.shields.io/github/actions/workflow/status/MyUnisoft/httpie/node.js.yml\" alt=\"github ci workflow\">\n    </a>\n    <a href=\"https://github.com/MyUnisoft/httpie\">\n      <img src=\"https://img.shields.io/github/languages/code-size/MyUnisoft/httpie?style=flat-square\" alt=\"size\">\n    </a>\n</p>\n\n## 📢 About\n\nThe package is inspired by lukeed [httpie](https://github.com/lukeed/httpie) (The use is relatively similar). This package use new Node.js http client [undici](https://github.com/nodejs/undici) under the hood.\n\nThis fork is an opinionated version of handling request body, especially JSON ones, and that allow to properly delegate all other body types to `undici` (like `FormData` bodies, for example, that was not properly handled).\n\n## 🔬 Features\n\n- Automatically handles JSON requests (through a `json(bodyObj)` call) and responses.\n- Includes aliases for common HTTP verbs: `get`, `post`, `put`, `patch`, and `del`.\n- Able to automatically detect domains and paths to assign the right Agent (use a LRU cache to avoid repetitive computation).\n- Allows to use an accurate rate-limiter like `p-ratelimit` with the `limit` option.\n- Built-in retry mechanism with **custom policies**.\n\nThanks to undici:\n\n- Support [HTTP redirections](https://developer.mozilla.org/en-US/docs/Web/HTTP/Redirections) with the `maxRedirections` argument.\n- Implement high-level API for undici **stream** and **pipeline** method.\n- High performance (see [benchmarks](https://undici.nodejs.org/#/?id=benchmarks)).\n- Work well with **newest** Node.js API [AbortController](https://nodejs.org/dist/latest-v16.x/docs/api/globals.html#globals_class_abortcontroller) to cancel http request.\n\nLight with seriously maintained dependencies:\n\n![](./docs/images/nodesecure.PNG)\n\n## 🚧 Requirements\n- [Node.js](https://nodejs.org/en/) version 14 or higher\n\n## 🚀 Getting Started\n\nThis package is available in the Node Package Repository and can be easily installed with [npm](https://docs.npmjs.com/getting-started/what-is-npm) or [yarn](https://yarnpkg.com).\n\n```bash\n$ npm i @atomictech/httpie\n# or\n$ yarn add @atomictech/httpie\n```\n\n## 📚 Usage example\n\nThe MyUnisoft httpie client is very similar to lukeed httpie http client.\n\n```js\nimport * as httpie from \"@atomictech/httpie\";\n\ntry {\n  const { data } = await httpie.get(\"https://jsonplaceholder.typicode.com/posts\");\n  console.log(data);\n\n  const response = await httpie.post(\"https://jsonplaceholder.typicode.com/posts\", {\n    body: httpie.json({\n      title: \"foo\",\n      body: \"bar\",\n      userId: 1\n    })\n  });\n\n  console.log(response.statusCode);\n  console.log(response.statusMessage);\n  console.log(response.data);\n}\ncatch (error) {\n  console.log(error.message);\n  console.log(error.statusCode);\n  console.log(error.headers);\n  console.log(error.data);\n}\n```\n\n> 👀 For more examples of use please look at the root folder **examples**.\n\n## 📜 API\n\n- [Request API](./docs/request.md)\n- [Retry API](./docs/retry.md)\n- [Work and manage Agents](./docs/agents.md)\n\n\n## Contributors ✨\n\n<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->\n[![All Contributors](https://img.shields.io/badge/all_contributors-1-orange.svg?style=flat-square)](#contributors-)\n<!-- ALL-CONTRIBUTORS-BADGE:END -->\n\nThanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):\n\n<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->\n<!-- prettier-ignore-start -->\n<!-- markdownlint-disable -->\n<table>\n  <tr>\n    <td align=\"center\"><a href=\"https://www.linkedin.com/in/thomas-gentilhomme/\"><img src=\"https://avatars.githubusercontent.com/u/4438263?v=4?s=100\" width=\"100px;\" alt=\"\"/><br /><sub><b>Gentilhomme</b></sub></a><br /><a href=\"https://github.com/MyUnisoft/httpie/commits?author=fraxken\" title=\"Code\">💻</a> <a href=\"https://github.com/MyUnisoft/httpie/commits?author=fraxken\" title=\"Documentation\">📖</a> <a href=\"https://github.com/MyUnisoft/httpie/pulls?q=is%3Apr+reviewed-by%3Afraxken\" title=\"Reviewed Pull Requests\">👀</a> <a href=\"#security-fraxken\" title=\"Security\">🛡️</a> <a href=\"https://github.com/MyUnisoft/httpie/issues?q=author%3Afraxken\" title=\"Bug reports\">🐛</a></td>\n  </tr>\n</table>\n\n<!-- markdownlint-restore -->\n<!-- prettier-ignore-end -->\n\n<!-- ALL-CONTRIBUTORS-LIST:END -->\n\n## License\nMIT\n","readmeFilename":"README.md"}