superagent 7.1.6 → 8.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +35 -39
- package/dist/superagent.js +247 -352
- package/dist/superagent.min.js +1 -1
- package/lib/agent-base.js +8 -20
- package/lib/client.js +88 -101
- package/lib/node/agent.js +19 -23
- package/lib/node/http2wrapper.js +54 -67
- package/lib/node/index.js +176 -217
- package/lib/node/parsers/image.js +5 -5
- package/lib/node/parsers/index.js +2 -2
- package/lib/node/parsers/json.js +5 -5
- package/lib/node/parsers/text.js +3 -3
- package/lib/node/parsers/urlencoded.js +5 -5
- package/lib/node/response.js +16 -14
- package/lib/node/unzip.js +15 -15
- package/lib/request-base.js +38 -42
- package/lib/response-base.js +7 -7
- package/lib/utils.js +21 -27
- package/package.json +20 -22
- package/HISTORY.md +0 -692
package/README.md
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
# superagent
|
|
2
2
|
|
|
3
3
|
[](https://travis-ci.org/visionmedia/superagent)
|
|
4
|
-
[](https://codecov.io/gh/visionmedia/superagent)
|
|
5
4
|
[](https://github.com/sindresorhus/xo)
|
|
6
5
|
[](https://github.com/prettier/prettier)
|
|
7
6
|
[](https://lass.js.org)
|
|
@@ -72,7 +71,7 @@ superagent.post('/api/pet').then(console.log).catch(console.error);
|
|
|
72
71
|
|
|
73
72
|
### Browser
|
|
74
73
|
|
|
75
|
-
**The browser-ready, minified version of `superagent` is only
|
|
74
|
+
**The browser-ready, minified version of `superagent` is only 50 KB (minified and gzipped).**
|
|
76
75
|
|
|
77
76
|
Browser-ready versions of this module are available via [jsdelivr][], [unpkg][], and also in the `node_modules/superagent/dist` folder in downloads of the `superagent` package.
|
|
78
77
|
|
|
@@ -83,7 +82,7 @@ Browser-ready versions of this module are available via [jsdelivr][], [unpkg][],
|
|
|
83
82
|
This is the solution for you if you're just using `<script>` tags everywhere!
|
|
84
83
|
|
|
85
84
|
```html
|
|
86
|
-
<script src="https://polyfill.io/v3/polyfill.min.js?features=
|
|
85
|
+
<script src="https://polyfill.io/v3/polyfill.min.js?features=WeakRef,BigInt"></script>
|
|
87
86
|
<script src="https://cdn.jsdelivr.net/npm/superagent"></script>
|
|
88
87
|
<!-- if you wish to use unpkg.com instead: -->
|
|
89
88
|
<!-- <script src="https://unpkg.com/superagent"></script> -->
|
|
@@ -120,38 +119,37 @@ If you are using [browserify][], [webpack][], [rollup][], or another bundler, th
|
|
|
120
119
|
```
|
|
121
120
|
|
|
122
121
|
```sh
|
|
123
|
-
and_chr
|
|
124
|
-
and_ff
|
|
125
|
-
and_qq
|
|
126
|
-
and_uc
|
|
127
|
-
android
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
firefox
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
ios_saf 12.
|
|
145
|
-
|
|
122
|
+
and_chr 102
|
|
123
|
+
and_ff 101
|
|
124
|
+
and_qq 10.4
|
|
125
|
+
and_uc 12.12
|
|
126
|
+
android 101
|
|
127
|
+
chrome 103
|
|
128
|
+
chrome 102
|
|
129
|
+
chrome 101
|
|
130
|
+
chrome 100
|
|
131
|
+
edge 103
|
|
132
|
+
edge 102
|
|
133
|
+
edge 101
|
|
134
|
+
firefox 101
|
|
135
|
+
firefox 100
|
|
136
|
+
firefox 91
|
|
137
|
+
ios_saf 15.5
|
|
138
|
+
ios_saf 15.4
|
|
139
|
+
ios_saf 15.2-15.3
|
|
140
|
+
ios_saf 15.0-15.1
|
|
141
|
+
ios_saf 14.5-14.8
|
|
142
|
+
ios_saf 14.0-14.4
|
|
143
|
+
ios_saf 12.2-12.5
|
|
144
|
+
kaios 2.5
|
|
146
145
|
op_mini all
|
|
147
|
-
op_mob
|
|
148
|
-
|
|
149
|
-
opera
|
|
150
|
-
|
|
151
|
-
safari
|
|
152
|
-
|
|
153
|
-
samsung
|
|
154
|
-
samsung 7.2-7.4
|
|
146
|
+
op_mob 64
|
|
147
|
+
opera 86
|
|
148
|
+
opera 85
|
|
149
|
+
safari 15.5
|
|
150
|
+
safari 15.4
|
|
151
|
+
samsung 17.0
|
|
152
|
+
samsung 16.0
|
|
155
153
|
```
|
|
156
154
|
|
|
157
155
|
### Required Browser Features
|
|
@@ -159,11 +157,11 @@ If you are using [browserify][], [webpack][], [rollup][], or another bundler, th
|
|
|
159
157
|
We recommend using <https://polyfill.io> (specifically with the bundle mentioned in [VanillaJS](#vanillajs) above):
|
|
160
158
|
|
|
161
159
|
```html
|
|
162
|
-
<script src="https://polyfill.io/v3/polyfill.min.js?features=
|
|
160
|
+
<script src="https://polyfill.io/v3/polyfill.min.js?features=WeakRef,BigInt"></script>
|
|
163
161
|
```
|
|
164
162
|
|
|
165
|
-
*
|
|
166
|
-
*
|
|
163
|
+
* WeakRef is not supported in Opera 85, iOS Safari 12.2-12.5
|
|
164
|
+
* BigInt is not supported in iOS Safari 12.2-12.5
|
|
167
165
|
|
|
168
166
|
|
|
169
167
|
## Plugins
|
|
@@ -261,8 +259,6 @@ Our breaking changes are mostly in rarely used functionality and from stricter e
|
|
|
261
259
|
|
|
262
260
|
[yarn]: https://yarnpkg.com/
|
|
263
261
|
|
|
264
|
-
[formdata-polyfill]: https://www.npmjs.com/package/formdata-polyfill
|
|
265
|
-
|
|
266
262
|
[jsdelivr]: https://www.jsdelivr.com/
|
|
267
263
|
|
|
268
264
|
[unpkg]: https://unpkg.com/
|