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