Got:Node.js 的人性化和强大的 HTTP 请求库-开源

时间:2021-06-24 05:36:58
【文件属性】:
文件名称:Got:Node.js 的人性化和强大的 HTTP 请求库-开源
文件大小:484KB
文件格式:ZIP
更新时间:2021-06-24 05:36:58
开源软件 Got 实现了符合 RFC 7234 的 HTTP 缓存,它在内存中开箱即用,并且可以轻松插入各种存储适配器。 Got 在内部使用 Keyv 来支持各种存储适配器。 对于更具可扩展性的东西,您可以使用官方 Keyv 存储适配器。 钩子允许在请求生命周期中进行修改。 钩子函数可能是异步的并串行运行。 在请求被发送之前,Got 不会对请求做进一步的更改。 当您想要创建 API 客户端(例如,使用 HMAC 签名)时,这与 got.extend() 结合使用特别有用。 您可以通过返回类似 ClientRequest 的实例或类似 IncomingMessage 的实例来覆盖请求函数。 这在创建自定义缓存机制时非常有用。 响应对象通常是一个 Node.js HTTP 响应流,但是,如果从缓存返回,它将是一个类似响应的对象,其行为方式相同。
【文件预览】:
sindresorhus-got-91bd348
----.gitignore(49B)
----tsconfig.json(224B)
----.github()
--------security.md(179B)
--------PULL_REQUEST_TEMPLATE.md(252B)
--------funding.yml(52B)
--------ISSUE_TEMPLATE()
----test()
--------retry.ts(11KB)
--------cookies.ts(6KB)
--------promise.ts(2KB)
--------cache.ts(9KB)
--------progress.ts(5KB)
--------weakable-map.ts(578B)
--------fixtures()
--------pagination.ts(15KB)
--------url-to-options.ts(3KB)
--------response-parse.ts(7KB)
--------headers.ts(7KB)
--------redirects.ts(12KB)
--------create.ts(8KB)
--------http.ts(9KB)
--------normalize-arguments.ts(3KB)
--------gzip.ts(4KB)
--------helpers.ts(624B)
--------https.ts(12KB)
--------hooks.ts(25KB)
--------post.ts(9KB)
--------cancel.ts(7KB)
--------helpers()
--------arguments.ts(14KB)
--------types()
--------merge-instances.ts(5KB)
--------unix-socket.ts(2KB)
--------timeout.ts(15KB)
--------error.ts(9KB)
--------stream.ts(12KB)
--------agent.ts(5KB)
----documentation()
--------advanced-creation.md(3KB)
--------examples()
--------migration-guides.md(6KB)
--------lets-make-a-plugin.md(7KB)
----source()
--------types.ts(12KB)
--------utils()
--------as-promise()
--------create.ts(8KB)
--------index.ts(3KB)
--------core()
----.gitattributes(31B)
----package.json(3KB)
----readme.md(84KB)
----benchmark()
--------server.ts(459B)
--------index.ts(5KB)
----media()
--------logo.png(3KB)
--------logo.sketch(18KB)
--------logo.ai(356KB)
--------logo.svg(997B)
----.travis.yml(760B)
----.editorconfig(175B)
----license(1KB)
----.npmrc(19B)

网友评论