{"_id":"@blued-core-oversea/undici-http-client","_rev":"2-4c6da7a69ce88ceef9c8e0fae01766ec","name":"@blued-core-oversea/undici-http-client","dist-tags":{"latest":"0.2.1"},"versions":{"0.1.0":{"name":"@blued-core-oversea/undici-http-client","version":"0.1.0","author":"","license":"ISC","_id":"@blued-core-oversea/undici-http-client@0.1.0","maintainers":[{"name":"bluediapp","email":"iappdeveloper@blued.com"}],"dist":{"shasum":"9481b29b89e756e5f01f62938ec0aa3ba9e31c67","tarball":"https://registry.npmjs.org/@blued-core-oversea/undici-http-client/-/undici-http-client-0.1.0.tgz","fileCount":21,"integrity":"sha512-A6EN09qUnNmJomTSOGg4bBdpILPausbNwgKHNTonjx09ZjPblihm801e/6aQO3z4oJ/vfIyMhc6mBXTKyC6zUg==","signatures":[{"sig":"MEUCIH8s4Ec3QNJY4nF7XOa3bwrXkmZtRxeWmAKiTlYluI/cAiEA3cIAYgE92mCbx0O9inq/wQPx+PecGGXRsbytGVmIYnY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":36901},"main":"dist/index.js","gitHead":"29552cf0040f35d9396a2d655914b5709121178e","scripts":{"test":"jest","build":"rm -rf dist && tsc","watch":"tsc -w"},"_npmUser":{"name":"bluediapp","email":"iappdeveloper@blued.com"},"_npmVersion":"6.14.6","description":"undici http client","directories":{},"_nodeVersion":"12.18.3","dependencies":{"undici":"^5.20.0","@blued-core/qconf":"^2.0.2"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.5.1","ts-jest":"^27.1.5","typescript":"^4.9.5","@types/jest":"^27.5.2","@types/node":"^17.0.45"},"_npmOperationalInternal":{"tmp":"tmp/undici-http-client_0.1.0_1732255503301_0.7199811693107623","host":"s3://npm-registry-packages"}},"0.1.1":{"name":"@blued-core-oversea/undici-http-client","version":"0.1.1","author":"","license":"ISC","_id":"@blued-core-oversea/undici-http-client@0.1.1","maintainers":[{"name":"bluediapp","email":"iappdeveloper@blued.com"}],"dist":{"shasum":"4ebf559a82bea07eaf2430bfc7f3432e806c58c3","tarball":"https://registry.npmjs.org/@blued-core-oversea/undici-http-client/-/undici-http-client-0.1.1.tgz","fileCount":21,"integrity":"sha512-DX3SNIF6uu43PNkxetmyqNqZhEkR0b/k38LfZGd5DK8NCRTsFIY1GPX/eqnSh3XVSw7LqaGjkzVYD+8w32tklA==","signatures":[{"sig":"MEYCIQDBUO/yTRuLcNrrfq50i9HJ5CjFFTZSesMx4TQG//2K3gIhAIlqtwHU7k97xfhp3i74fGmCEPPFyn36oAbbST2K+yJn","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":37087},"main":"dist/index.js","gitHead":"724623927901358374aa25feea149009e0c74250","scripts":{"test":"jest","build":"rm -rf dist && tsc","watch":"tsc -w"},"_npmUser":{"name":"bluediapp","email":"iappdeveloper@blued.com"},"_npmVersion":"6.14.6","description":"undici http client","directories":{},"_nodeVersion":"12.18.3","dependencies":{"undici":"^5.20.0","@blued-core/qconf":"^2.0.2"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.5.1","ts-jest":"^27.1.5","typescript":"^4.9.5","@types/jest":"^27.5.2","@types/node":"^17.0.45"},"_npmOperationalInternal":{"tmp":"tmp/undici-http-client_0.1.1_1732255922633_0.6361377211820287","host":"s3://npm-registry-packages"}},"0.2.1":{"name":"@blued-core-oversea/undici-http-client","version":"0.2.1","description":"undici http client","main":"dist/index.js","scripts":{"build":"rm -rf dist && tsc","watch":"tsc -w","test":"node build/test_client.js"},"author":"","license":"ISC","dependencies":{"@blued-core/qconf":"^2.0.2","undici":"^5.23.0"},"devDependencies":{"@types/node":"^17.0.45","typescript":"^4.9.5"},"gitHead":"6ee3be5df8b3f091e15535059a767b52471d05e1","_id":"@blued-core-oversea/undici-http-client@0.2.1","_nodeVersion":"12.18.3","_npmVersion":"6.14.6","dist":{"integrity":"sha512-mKz0fHt5jIwlZT6o3PB5ewmdBRnz3n9fwCCsB7ubxHamer2y9wSO3xlXBdavFzfVniHkdy+eP5et9itEV+ikOA==","shasum":"976a04b65cdcf4af584b05119bf6df9c622863e5","tarball":"https://registry.npmjs.org/@blued-core-oversea/undici-http-client/-/undici-http-client-0.2.1.tgz","fileCount":20,"unpackedSize":36770,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIC/yM6pPs5bXkyWxWie0TBVekIamj4rRfLf9D1v6dp8DAiEArY8LQAXjvktwSLEjI60S28WMjnwRBLhHGMzKJB44ELk="}]},"_npmUser":{"name":"bluediapp","email":"iappdeveloper@blued.com"},"directories":{},"maintainers":[{"name":"bluediapp","email":"iappdeveloper@blued.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/undici-http-client_0.2.1_1732259679642_0.5573821756993933"},"_hasShrinkwrap":false}},"time":{"created":"2024-11-22T06:05:03.195Z","modified":"2024-11-22T07:14:39.998Z","0.1.0":"2024-11-22T06:05:03.475Z","0.1.1":"2024-11-22T06:12:02.776Z","0.2.1":"2024-11-22T07:14:39.799Z"},"license":"ISC","description":"undici http client","maintainers":[{"name":"bluediapp","email":"iappdeveloper@blued.com"}],"readme":"<!--\n * @Date: 2024-11-22 13:11:34\n * @LastEditors: kiddy fanzhenzhen@blued.com\n * @LastEditTime: 2024-11-22 14:11:06\n * @FilePath: /node-util-http-client/README.md\n * @Description: \n-->\n基于 undici 的一层封装。\n\n```bas@blued-core-oversea/undici-http-client\n```\n\nhttp request client:\n\n```typescript\nconst httpClient = new RequestClient({\n  test: {\n    maxConnections: 100,\n    isQconf: true,\n    qconfHost: '/xxxxxx/xxxx/xxx',\n  },\n})\n\n// or\nconst httpClient = new RequestClient({\n  test: '/xxxxxx/xxxx/xxx', // qconf 地址\n})\n\nconst testClient = () => httpClient.getClient('test')\n\nasync function main () {\n  const res = await testClient().get({\n    url: 'test/v1',\n    headersTimeout: 100,\n  })\n\n  console.log(res)\n}\n\nmain()\n\n```\n\n支持的 API 列表\n```\n1. get(config: Config): Promise<any>\n2. post(config: Config): Promise<any>\n3. put(config: Config): Promise<any>\n4. delete(config: Config): Promise<any>\n5. getData(config: Config): Promise<any>\n6. postData(config: Config): Promise<any>\n7. putData(config: Config): Promise<any>\n8. deleteData(config: Config): Promise<any>\n9. getString(config: Config): Promise<string>\n10. postString(config: Config): Promise<string>\n11. putString(config: Config): Promise<string>\n12. deleteString(config: Config): Promise<string>\n13. do(config: Config, method: undici.Dispatcher.HttpMethod): Promise<undici.Dispatcher.ResponseData>\n14. doWithoutStatusCodeException(config: Config, method: undici.Dispatcher.HttpMethod): Promise<undici.Dispatcher.ResponseData>\n```","readmeFilename":"README.md"}