Got

🌐 Human-friendly and powerful HTTP request library for Node.js
Categories > Security > Https
Alternatives To Got
Project NameStarsDownloadsRepos Using ThisPackages Using ThisMost Recent CommitTotal ReleasesLatest ReleaseOpen IssuesLicenseLanguage
Caddy47,652118334a day ago85October 26, 202081apache-2.0Go
Fast and extensible multi-platform HTTP/1-2-3 web server with automatic HTTPS
Curl30,3657313 hours ago30May 11, 202289otherC
A command line tool and library for transferring data with URL syntax, supporting DICT, FILE, FTP, FTPS, GOPHER, GOPHERS, HTTP, HTTPS, IMAP, IMAPS, LDAP, LDAPS, MQTT, POP3, POP3S, RTMP, RTMPS, RTSP, SCP, SFTP, SMB, SMBS, SMTP, SMTPS, TELNET, TFTP, WS and WSS. libcurl offers a myriad of powerful features
Nginxconfig.io25,773
20 hours ago44mitJavaScript
⚙️ NGINX config generator on steroids 💉
Echo25,7721,60610 days ago165September 04, 202266mitGo
High performance, minimalist Go web framework
Nps25,653
3 months ago53October 09, 2021409gpl-3.0Go
一款轻量级、高性能、功能强大的内网穿透代理服务器。支持tcp、udp、socks5、http等几乎所有流量转发,可用来访问内网网站、本地支付接口调试、ssh访问、远程桌面,内网dns解析、内网socks5代理等等……,并带有功能强大的web管理端。a lightweight, high-performance, powerful intranet penetration proxy server, with a powerful web management terminal.
Node Http Proxy13,363398,0652,9326 days ago103May 17, 2020579otherJavaScript
A full-featured http proxy for node.js
Got13,074235,7156,42914 days ago162September 19, 202281mitTypeScript
🌐 Human-friendly and powerful HTTP request library for Node.js
Whistle12,51511176 days ago539September 13, 202233mitJavaScript
HTTP, HTTP2, HTTPS, Websocket debugging proxy
Nginx Admins Handbook12,393
2 years ago1mitShell
How to improve NGINX performance, security, and other important things.
Halfrost Field11,971
2 months ago6cc-by-sa-4.0Go
✍🏻 这里是写博客的地方 —— Halfrost-Field 冰霜之地
Alternatives To Got
Select To Compare


Alternative Project Comparisons
Readme

Human-friendly and powerful HTTP request library for Node.js

Downloads Install size

See how Got compares to other HTTP libraries


For browser usage, we recommend Ky by the same people.


Support questions should be asked here.

Install

npm install got

Warning: This package is native ESM and no longer provides a CommonJS export. If your project uses CommonJS, you will have to convert to ESM or use the dynamic import() function. Please don't open issues for questions regarding CommonJS / ESM.

Got v11 is no longer maintained and we will not accept any backport requests.

Take a peek

A quick start guide is available.

JSON mode

Got has a dedicated option for handling JSON payload.
Furthermore, the promise exposes a .json<T>() function that returns Promise<T>.

import got from 'got';

const {data} = await got.post('https://httpbin.org/anything', {
	json: {
		hello: 'world'
	}
}).json();

console.log(data);
//=> {"hello": "world"}

For advanced JSON usage, check out the parseJson and stringifyJson options.

For more useful tips like this, visit the Tips page.

Highlights

Documentation

By default, Got will retry on failure. To disable this option, set options.retry.limit to 0.

Main API

Timeouts and retries

Advanced creation

Cache, Proxy and UNIX sockets

Integration


Migration guides

Got plugins

  • got4aws - Got convenience wrapper to interact with AWS v4 signed APIs
  • gh-got - Got convenience wrapper to interact with the GitHub API
  • gl-got - Got convenience wrapper to interact with the GitLab API
  • gotql - Got convenience wrapper to interact with GraphQL using JSON-parsed queries instead of strings
  • got-fetch - Got with a fetch interface
  • got-scraping - Got wrapper specifically designed for web scraping purposes
  • got-ssrf - Got wrapper to protect server-side requests against SSRF attacks

Legacy

  • travis-got - Got convenience wrapper to interact with the Travis API
  • graphql-got - Got convenience wrapper to interact with GraphQL

Comparison

got node-fetch ky axios superagent
HTTP/2 support ✔️ ❌ ❌ ❌ ✔️**
Browser support ❌ ✔️* ✔️ ✔️ ✔️
Promise API ✔️ ✔️ ✔️ ✔️ ✔️
Stream API ✔️ Node.js only ❌ ❌ ✔️
Pagination API ✔️ ❌ ❌ ❌ ❌
Request cancelation ✔️ ✔️ ✔️ ✔️ ✔️
RFC compliant caching ✔️ ❌ ❌ ❌ ❌
Cookies (out-of-the-box) ✔️ ❌ ❌ ❌ ❌
Follows redirects ✔️ ✔️ ✔️ ✔️ ✔️
Retries on failure ✔️ ❌ ✔️ ❌ ✔️
Progress events ✔️ ❌ ✔️*** Browser only ✔️
Handles gzip/deflate ✔️ ✔️ ✔️ ✔️ ✔️
Advanced timeouts ✔️ ❌ ❌ ❌ ❌
Timings ✔️ ❌ ❌ ❌ ❌
Errors with metadata ✔️ ❌ ✔️ ✔️ ❌
JSON mode ✔️ ✔️ ✔️ ✔️ ✔️
Custom defaults ✔️ ❌ ✔️ ✔️ ❌
Composable ✔️ ❌ ❌ ❌ ✔️
Hooks ✔️ ❌ ✔️ ✔️ ❌
Issues open
Issues closed
Downloads
Coverage TBD
Build
Bugs
Dependents
Install size
GitHub stars
TypeScript support
Last commit

* It's almost API compatible with the browser fetch API.
** Need to switch the protocol manually. Doesn't accept PUSH streams and doesn't reuse HTTP/2 sessions.
*** Currently, only DownloadProgress event is supported, UploadProgress event is not supported.
Requires Node.js 15.10.0 or above.
❇️ Almost-stable feature, but the API may change. Don't hesitate to try it out!
❔ Feature in early stage of development. Very experimental.

Click here to see the install size of the Got dependencies.

Maintainers

Sindre Sorhus Szymon Marczak
Sindre Sorhus Szymon Marczak
Former

These amazing companies are using Got


Segment is a happy user of Got! Got powers the main backend API that our app talks to. It's used by our in-house RPC client that we use to communicate with all microservices.

Vadim Demedes

Antora, a static site generator for creating documentation sites, uses Got to download the UI bundle. In Antora, the UI bundle (aka theme) is maintained as a separate project. That project exports the UI as a zip file we call the UI bundle. The main site generator downloads that UI from a URL using Got and streams it to vinyl-zip to extract the files. Those files go on to be used to create the HTML pages and supporting assets.

Dan Allen

GetVoIP is happily using Got in production. One of the unique capabilities of Got is the ability to handle Unix sockets which enables us to build a full control interfaces for our docker stack.

Daniel Kalen

We're using Got inside of Exoframe to handle all the communication between CLI and server. Exoframe is a self-hosted tool that allows simple one-command deployments using Docker.

Tim Ermilov

Karaoke Mugen uses Got to fetch content updates from its online server.

Axel Terizaki

Renovate uses Got, gh-got and gl-got to send millions of queries per day to GitHub, GitLab, npmjs, PyPi, Packagist, Docker Hub, Terraform, CircleCI, and more.

Rhys Arkins

Resistbot uses Got to communicate from the API frontend where all correspondence ingresses to the officials lookup database in back.

Chris Erickson

Natural Cycles is using Got to communicate with all kinds of 3rd-party REST APIs (over 9000!).

Kirill Groshkov

Microlink is a cloud browser as an API service that uses Got widely as the main HTTP client, serving ~22M requests a month, every time a network call needs to be performed.

Kiko Beats

Were using Got at Radity. Thanks for such an amazing work!

Mirzayev Farid

Got has been a crucial component of Apify's scraping for years. We use it to extract data from billions of web pages every month, and we really appreciate the powerful API and extensibility, which allowed us to build our own specialized HTTP client on top of Got. The support has always been stellar too.

Ondra Urban

For enterprise

Available as part of the Tidelift Subscription.

The maintainers of got and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. Learn more.

Popular Https Projects
Popular Http Projects
Popular Security Categories
Related Searches

Get A Weekly Email With Trending Projects For These Categories
No Spam. Unsubscribe easily at any time.
Typescript
Json
Http
Types
Promise
Https
Http Client
Http Requests