Got implements RFC 7234 compliant HTTP caching which works out of the box in-memory and is easily pluggable with a wide range of storage adapters. Got uses Keyv internally to support a wide range of storage adapters. For something more scalable you could use an official Keyv storage adapter. Hooks allow modifications during the request lifecycle. Hook functions may be async and are run serially. Got will make no further changes to the request before it is sent. This is especially useful in conjunction with got.extend() when you want to create an API client that, for example, uses HMAC-signing. You can override the request function by returning a ClientRequest-like instance or a IncomingMessage-like instance. This is very useful when creating a custom cache mechanism. The response object will typically be a Node.js HTTP response stream, however, if returned from the cache it will be a response-like object which behaves in the same way.

Features

  • Promise API, stream API, and pagination API
  • HTTP2 support, request cancelation, and RFC compliant caching
  • Follows redirects, retries on failure, and progress events
  • Handles gzip/deflate/brotli, timeout handling, and errors with metadata
  • JSON mode, WHATWG URL support, and HTTPS API
  • Instances with custom defaults, includes types, and it's composable

Project Samples

Project Activity

See All Activity >

License

MIT License

Follow Got

Got Web Site

You Might Also Like
Our Free Plans just got better! | Auth0 by Okta Icon
Our Free Plans just got better! | Auth0 by Okta

With up to 25k MAUs and unlimited Okta connections, our Free Plan lets you focus on what you do best—building great apps.

You asked, we delivered! Auth0 is excited to expand our Free and Paid plans to include more options so you can focus on building, deploying, and scaling applications without having to worry about your secuirty. Auth0 now, thank yourself later.
Try free now
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of Got!

Additional Project Details

Programming Language

TypeScript

Related Categories

TypeScript Libraries, TypeScript API Clients

Registered

2021-06-15