UNPKG

30.7 kBMarkdownView Raw
1<div align="center">
2 <br>
3 <br>
4 <img width="360" src="media/logo.svg" alt="Got">
5 <br>
6 <br>
7 <br>
8 <p>
9 <p>
10 <sup>
11 Sindre's open source work is supported by the community.<br>Special thanks to:
12 </sup>
13 </p>
14 <br>
15 <a href="https://retool.com/?utm_campaign=sindresorhus">
16 <img src="https://sindresorhus.com/assets/thanks/retool-logo.svg" width="210">
17 </a>
18 <br>
19 <br>
20 <a href="https://strapi.io/?ref=sindresorhus">
21 <div>
22 <img src="https://sindresorhus.com/assets/thanks/strapi-logo-white-bg.png" width="200" alt="Strapi">
23 </div>
24 <b>Strapi is the leading open-source headless CMS.</b>
25 <div>
26 <sup>It’s 100% JavaScript, fully customizable, and developer-first.</sup>
27 </div>
28 </a>
29 <br>
30 <br>
31 <a href="https://www.monito.com">
32 <div>
33 <img src="https://sindresorhus.com/assets/thanks/monito-logo.svg" width="210">
34 </div>
35 <b>Find the cheapest way to send money abroad</b>
36 </a>
37 <br>
38 <br>
39 <br>
40 <a href="https://keygen.sh">
41 <div>
42 <img src="https://sindresorhus.com/assets/thanks/keygen-logo.svg" width="180" alt="Keygen">
43 </div>
44 <b>A dead-simple software licensing and distribution API built for developers</b>
45 </a>
46 <br>
47 <br>
48 <br>
49 <a href="https://neverinstall.com/spaces/devtools?utm_source=github&utm_medium=sponsor&utm_campaign=sindre#gh-light-mode-only">
50 <div>
51 <img src="https://sindresorhus.com/assets/thanks/neverinstall-logo-light.svg" width="200" alt="neverinstall">
52 </div>
53 <br>
54 <b>All your favourite IDE's now available on the cloud</b>
55 <div>
56 <sub>
57 Neverinstall gives you an uninterrupted development experience and improved accessibility,
58 <br>
59 allowing you to code faster, better and on-the-go on your favourite IDEs like
60 <br>
61 Android Studio, VS Code, Jupyter and PyCharm using your browser.
62 </sub>
63 </div>
64 </a>
65 <a href="https://neverinstall.com/spaces/devtools?utm_source=github&utm_medium=sponsor&utm_campaign=sindre#gh-dark-mode-only">
66 <div>
67 <img src="https://sindresorhus.com/assets/thanks/neverinstall-logo-dark.svg" width="200" alt="neverinstall">
68 </div>
69 <br>
70 <b>All your favourite IDE's now available on the cloud</b>
71 <div>
72 <sub>
73 Neverinstall gives you an uninterrupted development experience and improved accessibility,
74 <br>
75 allowing you to code faster, better and on-the-go on your favourite IDEs like
76 <br>
77 Android Studio, VS Code, Jupyter and PyCharm using your browser.
78 </sub>
79 </div>
80 </a>
81 <br>
82 <br>
83 <br>
84 <a href="https://www.useanvil.com/?utm_source=sindresorhus#gh-light-mode-only">
85 <div>
86 <img src="https://sindresorhus.com/assets/thanks/anvil-logo-light.svg" width="200" alt="Anvil">
87 </div>
88 <br>
89 <b>Paperwork that makes the data work.</b>
90 <div>
91 <sub>
92 Easy APIs for paperwork. PDF generation, e-signature and embeddable no-code webforms.
93 <br>
94 The easiest way to build paperwork automation into your product.
95 </sub>
96 </div>
97 </a>
98 <a href="https://www.useanvil.com/?utm_source=sindresorhus#gh-dark-mode-only">
99 <div>
100 <img src="https://sindresorhus.com/assets/thanks/anvil-logo-dark.svg" width="200" alt="Anvil">
101 </div>
102 <br>
103 <b>Paperwork that makes the data work.</b>
104 <div>
105 <sub>
106 Easy APIs for paperwork. PDF generation, e-signature and embeddable no-code webforms.
107 <br>
108 The easiest way to build paperwork automation into your product.
109 </sub>
110 </div>
111 </a>
112 <br>
113 <br>
114 <br>
115 <br>
116 </p>
117 <br>
118 <br>
119</div>
120
121> Human-friendly and powerful HTTP request library for Node.js
122
123<!-- [![Coverage Status](https://codecov.io/gh/sindresorhus/got/branch/main/graph/badge.svg)](https://codecov.io/gh/sindresorhus/got/branch/main) -->
124[![Downloads](https://img.shields.io/npm/dm/got.svg)](https://npmjs.com/got)
125[![Install size](https://packagephobia.com/badge?p=got)](https://packagephobia.com/result?p=got)
126
127[See how Got compares to other HTTP libraries](#comparison)
128
129---
130
131For browser usage, we recommend [Ky](https://github.com/sindresorhus/ky) by the same people.
132
133---
134
135**Support questions should be asked [here](https://github.com/sindresorhus/got/discussions).**
136
137## Install
138
139```sh
140npm install got
141```
142
143**Warning:** This package is native [ESM](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules) and no longer provides a CommonJS export. If your project uses CommonJS, you'll have to [convert to ESM](https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c) or use the [dynamic `import()`](https://v8.dev/features/dynamic-import) function. Please don't open issues for questions regarding CommonJS / ESM. You can also use [Got v11](https://github.com/sindresorhus/got/tree/v11.8.3) instead which is pretty stable.
144
145## Take a peek
146
147### JSON mode
148
149Got has a dedicated option for handling JSON payload.\
150Furthermore, the promise exposes a `.json<T>()` function that returns `Promise<T>`.
151
152```js
153import got from 'got';
154
155const {data} = await got.post('https://httpbin.org/anything', {
156 json: {
157 hello: 'world'
158 }
159}).json();
160
161console.log(data);
162//=> {"hello": "world"}
163```
164
165For advanced JSON usage, check out the [`parseJson`](documentation/2-options.md#parsejson) and [`stringifyJson`](documentation/2-options.md#stringifyjson) options.
166
167**For more useful tips like this, visit the [Tips](documentation/tips.md) page.**
168
169## Highlights
170
171- [Used by 6K+ packages and 3M+ repos](https://github.com/sindresorhus/got/network/dependents)
172- [Actively maintained](https://github.com/sindresorhus/got/graphs/contributors)
173- [Trusted by many companies](#widely-used)
174
175## Documentation
176
177#### Main API
178
179- [x] [Promise API](documentation/1-promise.md)
180- [x] [Options](documentation/2-options.md)
181- [x] [Stream API](documentation/3-streams.md)
182- [x] [Pagination API](documentation/4-pagination.md)
183- [x] [Advanced HTTPS API](documentation/5-https.md)
184- [x] [HTTP/2 support](documentation/2-options.md#http2)
185- [x] [`Response` class](documentation/3-streams.md#response-1)
186
187#### Timeouts and retries
188
189- [x] [Advanced timeout handling](documentation/6-timeout.md)
190- [x] [Retries on failure](documentation/7-retry.md)
191- [x] [Errors with metadata](documentation/8-errors.md)
192
193#### Advanced creation
194
195- [x] [Hooks](documentation/9-hooks.md)
196- [x] [Instances](documentation/10-instances.md)
197- [x] [Progress events & other events](documentation/3-streams.md#events)
198- [x] [Plugins](documentation/lets-make-a-plugin.md)
199- [x] [Compose](documentation/examples/advanced-creation.js)
200
201#### Cache, Proxy and UNIX sockets
202
203- [x] [RFC compliant caching](documentation/cache.md)
204- [x] [Proxy support](documentation/tips.md#proxying)
205- [x] [Unix Domain Sockets](documentation/tips.md#unix)
206
207#### Integration
208
209- [x] [TypeScript support](documentation/typescript.md)
210- [x] [AWS](documentation/tips.md#aws)
211- [x] [Testing](documentation/tips.md#testing)
212
213---
214
215### Migration guides
216
217- [Request migration guide](documentation/migration-guides/request.md)
218 - [*(Note that Request is unmaintained)*](https://github.com/request/request/issues/3142)
219- [Axios](documentation/migration-guides/axios.md)
220- [Node.js](documentation/migration-guides/nodejs.md)
221
222## Got plugins
223
224- [`got4aws`](https://github.com/SamVerschueren/got4aws) - Got convenience wrapper to interact with AWS v4 signed APIs
225- [`gh-got`](https://github.com/sindresorhus/gh-got) - Got convenience wrapper to interact with the GitHub API
226- [`gl-got`](https://github.com/singapore/gl-got) - Got convenience wrapper to interact with the GitLab API
227- [`gotql`](https://github.com/khaosdoctor/gotql) - Got convenience wrapper to interact with GraphQL using JSON-parsed queries instead of strings
228- [`got-fetch`](https://github.com/alexghr/got-fetch) - Got with a [`fetch`](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API) interface
229- [`got-scraping`](https://github.com/apify/got-scraping) - Got wrapper specifically designed for web scraping purposes
230- [`got-ssrf`](https://github.com/JaneJeon/got-ssrf) - Got wrapper to protect server-side requests against SSRF attacks
231
232### Legacy
233
234- [travis-got](https://github.com/samverschueren/travis-got) - Got convenience wrapper to interact with the Travis API
235- [graphql-got](https://github.com/kevva/graphql-got) - Got convenience wrapper to interact with GraphQL
236
237## Comparison
238
239| | `got` | [`request`][r0] | [`node-fetch`][n0] | [`ky`][k0] | [`axios`][a0] | [`superagent`][s0] |
240|-----------------------|:-------------------:|:------------------:|:--------------------:|:------------------------:|:------------------:|:----------------------:|
241| HTTP/2 support | :heavy_check_mark:¹ | :x: | :x: | :x: | :x: | :heavy_check_mark:\*\* |
242| Browser support | :x: | :x: | :heavy_check_mark:\* | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |
243| Promise API | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |
244| Stream API | :heavy_check_mark: | :heavy_check_mark: | Node.js only | :x: | :x: | :heavy_check_mark: |
245| Pagination API | :heavy_check_mark: | :x: | :x: | :x: | :x: | :x: |
246| Request cancelation | :heavy_check_mark: | :x: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |
247| RFC compliant caching | :heavy_check_mark: | :x: | :x: | :x: | :x: | :x: |
248| Cookies (out-of-box) | :heavy_check_mark: | :heavy_check_mark: | :x: | :x: | :x: | :x: |
249| Follows redirects | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |
250| Retries on failure | :heavy_check_mark: | :x: | :x: | :heavy_check_mark: | :x: | :heavy_check_mark: |
251| Progress events | :heavy_check_mark: | :x: | :x: | :heavy_check_mark:\*\*\* | Browser only | :heavy_check_mark: |
252| Handles gzip/deflate | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |
253| Advanced timeouts | :heavy_check_mark: | :x: | :x: | :x: | :x: | :x: |
254| Timings | :heavy_check_mark: | :heavy_check_mark: | :x: | :x: | :x: | :x: |
255| Errors with metadata | :heavy_check_mark: | :x: | :x: | :heavy_check_mark: | :heavy_check_mark: | :x: |
256| JSON mode | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |
257| Custom defaults | :heavy_check_mark: | :heavy_check_mark: | :x: | :heavy_check_mark: | :heavy_check_mark: | :x: |
258| Composable | :heavy_check_mark: | :x: | :x: | :x: | :x: | :heavy_check_mark: |
259| Hooks | :heavy_check_mark: | :x: | :x: | :heavy_check_mark: | :heavy_check_mark: | :x: |
260| Issues open | [![][gio]][g1] | [![][rio]][r1] | [![][nio]][n1] | [![][kio]][k1] | [![][aio]][a1] | [![][sio]][s1] |
261| Issues closed | [![][gic]][g2] | [![][ric]][r2] | [![][nic]][n2] | [![][kic]][k2] | [![][aic]][a2] | [![][sic]][s2] |
262| Downloads | [![][gd]][g3] | [![][rd]][r3] | [![][nd]][n3] | [![][kd]][k3] | [![][ad]][a3] | [![][sd]][s3] |
263| Coverage | TBD | [![][rc]][r4] | [![][nc]][n4] | [![][kc]][k4] | [![][ac]][a4] | [![][sc]][s4] |
264| Build | [![][gb]][g5] | [![][rb]][r5] | [![][nb]][n5] | [![][kb]][k5] | [![][ab]][a5] | [![][sb]][s5] |
265| Bugs | [![][gbg]][g6] | [![][rbg]][r6] | [![][nbg]][n6] | [![][kbg]][k6] | [![][abg]][a6] | [![][sbg]][s6] |
266| Dependents | [![][gdp]][g7] | [![][rdp]][r7] | [![][ndp]][n7] | [![][kdp]][k7] | [![][adp]][a7] | [![][sdp]][s7] |
267| Install size | [![][gis]][g8] | [![][ris]][r8] | [![][nis]][n8] | [![][kis]][k8] | [![][ais]][a8] | [![][sis]][s8] |
268| GitHub stars | [![][gs]][g9] | [![][rs]][r9] | [![][ns]][n9] | [![][ks]][k9] | [![][as]][a9] | [![][ss]][s9] |
269| TypeScript support | [![][gts]][g10] | [![][rts]][r10] | [![][nts]][n10] | [![][kts]][k10] | [![][ats]][a10] | [![][sts]][s11] |
270| Last commit | [![][glc]][g11] | [![][rlc]][r11] | [![][nlc]][n11] | [![][klc]][k11] | [![][alc]][a11] | [![][slc]][s11] |
271
272\* It's almost API compatible with the browser `fetch` API.\
273\*\* Need to switch the protocol manually. Doesn't accept PUSH streams and doesn't reuse HTTP/2 sessions.\
274\*\*\* Currently, only `DownloadProgress` event is supported, `UploadProgress` event is not supported.\
275¹ Requires Node.js 15.10.0 or above.\
276:sparkle: Almost-stable feature, but the API may change. Don't hesitate to try it out!\
277:grey_question: Feature in early stage of development. Very experimental.
278
279<!-- GITHUB -->
280[k0]: https://github.com/sindresorhus/ky
281[r0]: https://github.com/request/request
282[n0]: https://github.com/node-fetch/node-fetch
283[a0]: https://github.com/axios/axios
284[s0]: https://github.com/visionmedia/superagent
285
286<!-- ISSUES OPEN -->
287[gio]: https://img.shields.io/github/issues-raw/sindresorhus/got?color=gray&label
288[kio]: https://img.shields.io/github/issues-raw/sindresorhus/ky?color=gray&label
289[rio]: https://img.shields.io/github/issues-raw/request/request?color=gray&label
290[nio]: https://img.shields.io/github/issues-raw/bitinn/node-fetch?color=gray&label
291[aio]: https://img.shields.io/github/issues-raw/axios/axios?color=gray&label
292[sio]: https://img.shields.io/github/issues-raw/visionmedia/superagent?color=gray&label
293
294[g1]: https://github.com/sindresorhus/got/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc
295[k1]: https://github.com/sindresorhus/ky/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc
296[r1]: https://github.com/request/request/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc
297[n1]: https://github.com/bitinn/node-fetch/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc
298[a1]: https://github.com/axios/axios/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc
299[s1]: https://github.com/visionmedia/superagent/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc
300
301<!-- ISSUES CLOSED -->
302[gic]: https://img.shields.io/github/issues-closed-raw/sindresorhus/got?color=blue&label
303[kic]: https://img.shields.io/github/issues-closed-raw/sindresorhus/ky?color=blue&label
304[ric]: https://img.shields.io/github/issues-closed-raw/request/request?color=blue&label
305[nic]: https://img.shields.io/github/issues-closed-raw/bitinn/node-fetch?color=blue&label
306[aic]: https://img.shields.io/github/issues-closed-raw/axios/axios?color=blue&label
307[sic]: https://img.shields.io/github/issues-closed-raw/visionmedia/superagent?color=blue&label
308
309[g2]: https://github.com/sindresorhus/got/issues?q=is%3Aissue+is%3Aclosed+sort%3Aupdated-desc
310[k2]: https://github.com/sindresorhus/ky/issues?q=is%3Aissue+is%3Aclosed+sort%3Aupdated-desc
311[r2]: https://github.com/request/request/issues?q=is%3Aissue+is%3Aclosed+sort%3Aupdated-desc
312[n2]: https://github.com/bitinn/node-fetch/issues?q=is%3Aissue+is%3Aclosed+sort%3Aupdated-desc
313[a2]: https://github.com/axios/axios/issues?q=is%3Aissue+is%3Aclosed+sort%3Aupdated-desc
314[s2]: https://github.com/visionmedia/superagent/issues?q=is%3Aissue+is%3Aclosed+sort%3Aupdated-desc
315
316<!-- DOWNLOADS -->
317[gd]: https://img.shields.io/npm/dm/got?color=darkgreen&label
318[kd]: https://img.shields.io/npm/dm/ky?color=darkgreen&label
319[rd]: https://img.shields.io/npm/dm/request?color=darkgreen&label
320[nd]: https://img.shields.io/npm/dm/node-fetch?color=darkgreen&label
321[ad]: https://img.shields.io/npm/dm/axios?color=darkgreen&label
322[sd]: https://img.shields.io/npm/dm/superagent?color=darkgreen&label
323
324[g3]: https://www.npmjs.com/package/got
325[k3]: https://www.npmjs.com/package/ky
326[r3]: https://www.npmjs.com/package/request
327[n3]: https://www.npmjs.com/package/node-fetch
328[a3]: https://www.npmjs.com/package/axios
329[s3]: https://www.npmjs.com/package/superagent
330
331<!-- COVERAGE -->
332[gc]: https://img.shields.io/coveralls/github/sindresorhus/got?color=0b9062&label
333[kc]: https://img.shields.io/codecov/c/github/sindresorhus/ky?color=0b9062&label
334[rc]: https://img.shields.io/coveralls/github/request/request?color=0b9062&label
335[nc]: https://img.shields.io/coveralls/github/bitinn/node-fetch?color=0b9062&label
336[ac]: https://img.shields.io/coveralls/github/mzabriskie/axios?color=0b9062&label
337[sc]: https://img.shields.io/codecov/c/github/visionmedia/superagent?color=0b9062&label
338
339[g4]: https://coveralls.io/github/sindresorhus/got
340[k4]: https://codecov.io/gh/sindresorhus/ky
341[r4]: https://coveralls.io/github/request/request
342[n4]: https://coveralls.io/github/bitinn/node-fetch
343[a4]: https://coveralls.io/github/mzabriskie/axios
344[s4]: https://codecov.io/gh/visionmedia/superagent
345
346<!-- BUILD -->
347[gb]: https://github.com/sindresorhus/got/actions/workflows/main.yml/badge.svg
348[kb]: https://github.com/sindresorhus/ky/actions/workflows/main.yml/badge.svg
349[rb]: https://img.shields.io/travis/request/request?label
350[nb]: https://img.shields.io/travis/bitinn/node-fetch?label
351[ab]: https://img.shields.io/travis/axios/axios?label
352[sb]: https://img.shields.io/travis/visionmedia/superagent?label
353
354[g5]: https://github.com/sindresorhus/got/actions/workflows/main.yml
355[k5]: https://github.com/sindresorhus/ky/actions/workflows/main.yml
356[r5]: https://travis-ci.org/github/request/request
357[n5]: https://travis-ci.org/github/bitinn/node-fetch
358[a5]: https://travis-ci.org/github/axios/axios
359[s5]: https://travis-ci.org/github/visionmedia/superagent
360
361<!-- BUGS -->
362[gbg]: https://img.shields.io/github/issues-raw/sindresorhus/got/bug?color=darkred&label
363[kbg]: https://img.shields.io/github/issues-raw/sindresorhus/ky/bug?color=darkred&label
364[rbg]: https://img.shields.io/github/issues-raw/request/request/Needs%20investigation?color=darkred&label
365[nbg]: https://img.shields.io/github/issues-raw/bitinn/node-fetch/bug?color=darkred&label
366[abg]: https://img.shields.io/github/issues-raw/axios/axios/type:confirmed%20bug?color=darkred&label
367[sbg]: https://img.shields.io/github/issues-raw/visionmedia/superagent/Bug?color=darkred&label
368
369[g6]: https://github.com/sindresorhus/got/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc+label%3Abug
370[k6]: https://github.com/sindresorhus/ky/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc+label%3Abug
371[r6]: https://github.com/request/request/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc+label%3A"Needs+investigation"
372[n6]: https://github.com/bitinn/node-fetch/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc+label%3Abug
373[a6]: https://github.com/axios/axios/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc+label%3A%22type%3Aconfirmed+bug%22
374[s6]: https://github.com/visionmedia/superagent/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc+label%3ABug
375
376<!-- DEPENDENTS -->
377[gdp]: https://badgen.net/npm/dependents/got?color=orange&label
378[kdp]: https://badgen.net/npm/dependents/ky?color=orange&label
379[rdp]: https://badgen.net/npm/dependents/request?color=orange&label
380[ndp]: https://badgen.net/npm/dependents/node-fetch?color=orange&label
381[adp]: https://badgen.net/npm/dependents/axios?color=orange&label
382[sdp]: https://badgen.net/npm/dependents/superagent?color=orange&label
383
384[g7]: https://www.npmjs.com/package/got?activeTab=dependents
385[k7]: https://www.npmjs.com/package/ky?activeTab=dependents
386[r7]: https://www.npmjs.com/package/request?activeTab=dependents
387[n7]: https://www.npmjs.com/package/node-fetch?activeTab=dependents
388[a7]: https://www.npmjs.com/package/axios?activeTab=dependents
389[s7]: https://www.npmjs.com/package/visionmedia?activeTab=dependents
390
391<!-- INSTALL SIZE -->
392[gis]: https://badgen.net/packagephobia/install/got?color=blue&label
393[kis]: https://badgen.net/packagephobia/install/ky?color=blue&label
394[ris]: https://badgen.net/packagephobia/install/request?color=blue&label
395[nis]: https://badgen.net/packagephobia/install/node-fetch?color=blue&label
396[ais]: https://badgen.net/packagephobia/install/axios?color=blue&label
397[sis]: https://badgen.net/packagephobia/install/superagent?color=blue&label
398
399[g8]: https://packagephobia.com/result?p=got
400[k8]: https://packagephobia.com/result?p=ky
401[r8]: https://packagephobia.com/result?p=request
402[n8]: https://packagephobia.com/result?p=node-fetch
403[a8]: https://packagephobia.com/result?p=axios
404[s8]: https://packagephobia.com/result?p=superagent
405
406<!-- GITHUB STARS -->
407[gs]: https://img.shields.io/github/stars/sindresorhus/got?color=white&label
408[ks]: https://img.shields.io/github/stars/sindresorhus/ky?color=white&label
409[rs]: https://img.shields.io/github/stars/request/request?color=white&label
410[ns]: https://img.shields.io/github/stars/bitinn/node-fetch?color=white&label
411[as]: https://img.shields.io/github/stars/axios/axios?color=white&label
412[ss]: https://img.shields.io/github/stars/visionmedia/superagent?color=white&label
413
414[g9]: https://github.com/sindresorhus/got
415[k9]: https://github.com/sindresorhus/ky
416[r9]: https://github.com/request/request
417[n9]: https://github.com/node-fetch/node-fetch
418[a9]: https://github.com/axios/axios
419[s9]: https://github.com/visionmedia/superagent
420
421<!-- TYPESCRIPT SUPPORT -->
422[gts]: https://badgen.net/npm/types/got?label
423[kts]: https://badgen.net/npm/types/ky?label
424[rts]: https://badgen.net/npm/types/request?label
425[nts]: https://badgen.net/npm/types/node-fetch?label
426[ats]: https://badgen.net/npm/types/axios?label
427[sts]: https://badgen.net/npm/types/superagent?label
428
429[g10]: https://github.com/sindresorhus/got
430[k10]: https://github.com/sindresorhus/ky
431[r10]: https://github.com/request/request
432[n10]: https://github.com/node-fetch/node-fetch
433[a10]: https://github.com/axios/axios
434[s10]: https://github.com/visionmedia/superagent
435
436<!-- LAST COMMIT -->
437[glc]: https://img.shields.io/github/last-commit/sindresorhus/got?color=gray&label
438[klc]: https://img.shields.io/github/last-commit/sindresorhus/ky?color=gray&label
439[rlc]: https://img.shields.io/github/last-commit/request/request?color=gray&label
440[nlc]: https://img.shields.io/github/last-commit/bitinn/node-fetch?color=gray&label
441[alc]: https://img.shields.io/github/last-commit/axios/axios?color=gray&label
442[slc]: https://img.shields.io/github/last-commit/visionmedia/superagent?color=gray&label
443
444[g11]: https://github.com/sindresorhus/got/commits
445[k11]: https://github.com/sindresorhus/ky/commits
446[r11]: https://github.com/request/request/commits
447[n11]: https://github.com/node-fetch/node-fetch/commits
448[a11]: https://github.com/axios/axios/commits
449[s11]: https://github.com/visionmedia/superagent/commits
450
451[Click here][InstallSizeOfTheDependencies] to see the install size of the Got dependencies.
452
453[InstallSizeOfTheDependencies]: https://packagephobia.com/result?p=@sindresorhus/is@4.0.1,@szmarczak/http-timer@4.0.5,@types/cacheable-request@6.0.1,@types/responselike@1.0.0,cacheable-lookup@6.0.0,cacheable-request@7.0.2,decompress-response@6.0.0,get-stream@6.0.1,http2-wrapper@2.0.5,lowercase-keys@2.0.0,p-cancelable@2.1.1,responselike@2.0.0
454
455## Maintainers
456
457[![Sindre Sorhus](https://github.com/sindresorhus.png?size=100)](https://sindresorhus.com) | [![Szymon Marczak](https://github.com/szmarczak.png?size=100)](https://github.com/szmarczak)
458---|---
459[Sindre Sorhus](https://sindresorhus.com) | [Szymon Marczak](https://github.com/szmarczak)
460
461###### Former
462
463- [Vsevolod Strukchinsky](https://github.com/floatdrop)
464- [Alexander Tesfamichael](https://github.com/alextes)
465- [Brandon Smith](https://github.com/brandon93s)
466- [Luke Childs](https://github.com/lukechilds)
467- [Giovanni Minotti](https://github.com/Giotino)
468
469<a name="widely-used"></a>
470## These amazing companies are using Got
471
472<table>
473<tbody>
474 <tr>
475 <td align="center">
476 <a href="https://segment.com">
477 <img width="90" valign="middle" src="https://user-images.githubusercontent.com/697676/47693700-ddb62500-dbb7-11e8-8332-716a91010c2d.png">
478 </a>
479 </td>
480 <td align="center">
481 <a href="https://antora.org">
482 <img width="100" valign="middle" src="https://user-images.githubusercontent.com/79351/47706840-d874cc80-dbef-11e8-87c6-5f0c60cbf5dc.png">
483 </a>
484 </td>
485 <td align="center">
486 <a href="https://getvoip.com">
487 <img width="150" valign="middle" src="https://user-images.githubusercontent.com/10832620/47869404-429e9480-dddd-11e8-8a7a-ca43d7f06020.png">
488 </a>
489 </td>
490 <td align="center">
491 <a href="https://github.com/exoframejs/exoframe">
492 <img width="150" valign="middle" src="https://user-images.githubusercontent.com/365944/47791460-11a95b80-dd1a-11e8-9070-e8f2a215e03a.png">
493 </a>
494 </td>
495 </tr>
496 <tr>
497 <td align="center">
498 <a href="http://karaokes.moe">
499 <img width="140" valign="middle" src="https://camo.githubusercontent.com/6860e5fa4684c14d8e1aa65df0aba4e6808ea1a9/687474703a2f2f6b6172616f6b65732e6d6f652f6173736574732f696d616765732f696e6465782e706e67">
500 </a>
501 </td>
502 <td align="center">
503 <a href="https://github.com/renovatebot/renovate">
504 <img width="150" valign="middle" src="https://camo.githubusercontent.com/206d470ac709b9a702a97b0c08d6f389a086793d/68747470733a2f2f72656e6f76617465626f742e636f6d2f696d616765732f6c6f676f2e737667">
505 </a>
506 </td>
507 <td align="center">
508 <a href="https://resist.bot">
509 <img width="150" valign="middle" src="https://user-images.githubusercontent.com/3322287/51992724-28736180-2473-11e9-9764-599cfda4b012.png">
510 </a>
511 </td>
512 <td align="center">
513 <a href="https://www.naturalcycles.com">
514 <img width="150" valign="middle" src="https://user-images.githubusercontent.com/170270/92244143-d0a8a200-eec2-11ea-9fc0-1c07f90b2113.png">
515 </a>
516 </td>
517 </tr>
518 <tr>
519 <td align="center">
520 <a href="https://microlink.io">
521 <img width="150" valign="middle" src="https://user-images.githubusercontent.com/36894700/91992974-1cc5dc00-ed35-11ea-9d04-f58b42ce6a5e.png">
522 </a>
523 </td>
524 <td align="center">
525 <a href="https://radity.com">
526 <img width="150" valign="middle" src="https://user-images.githubusercontent.com/29518613/91814036-97fb9500-ec44-11ea-8c6c-d198cc23ca29.png">
527 </a>
528 </td>
529 <td align="center">
530 <a href="https://apify.com">
531 <img width="150" valign="middle" src="https://user-images.githubusercontent.com/23726914/128673143-958b5930-b677-40ef-8087-5698a0c29c45.png">
532 </a>
533 </td>
534 </tr>
535</tbody>
536</table>
537
538<!-- <br> -->
539
540<!-- *Creating an awesome product? Open an issue to get listed here.* -->
541
542<br>
543
544> 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.
545>
546> — <a href="https://github.com/vadimdemedes">Vadim Demedes</a>
547
548> 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.
549>
550> — <a href="https://github.com/mojavelinux">Dan Allen</a>
551
552> 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.
553>
554> — <a href="https://github.com/danielkalen">Daniel Kalen</a>
555
556> 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.
557>
558> — <a href="https://github.com/yamalight">Tim Ermilov</a>
559
560> Karaoke Mugen uses Got to fetch content updates from its online server.
561>
562> — <a href="https://github.com/AxelTerizaki">Axel Terizaki</a>
563
564> 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.
565>
566> — <a href="https://github.com/rarkins">Rhys Arkins</a>
567
568> Resistbot uses Got to communicate from the API frontend where all correspondence ingresses to the officials lookup database in back.
569>
570> — <a href="https://github.com/chris-erickson">Chris Erickson</a>
571
572> Natural Cycles is using Got to communicate with all kinds of 3rd-party REST APIs (over 9000!).
573>
574> — <a href="https://github.com/kirillgroshkov">Kirill Groshkov</a>
575
576> 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.
577>
578> — <a href="https://github.com/Kikobeats">Kiko Beats</a>
579
580> We’re using Got at Radity. Thanks for such an amazing work!
581>
582> — <a href="https://github.com/MirzayevFarid">Mirzayev Farid</a>
583
584> 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.
585>
586> — <a href="https://github.com/mnmkng">Ondra Urban</a>
587
588## For enterprise
589
590Available as part of the Tidelift Subscription.
591
592The 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.](https://tidelift.com/subscription/pkg/npm-got?utm_source=npm-got&utm_medium=referral&utm_campaign=enterprise&utm_term=repo)