superagent 7.1.6 → 8.0.0
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 -38
- package/dist/superagent.js +233 -325
- package/dist/superagent.min.js +1 -1
- package/lib/agent-base.js +8 -20
- package/lib/client.js +87 -100
- package/lib/node/agent.js +19 -23
- package/lib/node/http2wrapper.js +51 -61
- package/lib/node/index.js +171 -212
- 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 +35 -39
- package/lib/response-base.js +7 -7
- package/lib/utils.js +21 -27
- package/package.json +7 -7
- package/HISTORY.md +0 -692
package/README.md
CHANGED
|
@@ -72,7 +72,7 @@ superagent.post('/api/pet').then(console.log).catch(console.error);
|
|
|
72
72
|
|
|
73
73
|
### Browser
|
|
74
74
|
|
|
75
|
-
**The browser-ready, minified version of `superagent` is only
|
|
75
|
+
**The browser-ready, minified version of `superagent` is only 50 KB (minified and gzipped).**
|
|
76
76
|
|
|
77
77
|
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
78
|
|
|
@@ -83,7 +83,7 @@ Browser-ready versions of this module are available via [jsdelivr][], [unpkg][],
|
|
|
83
83
|
This is the solution for you if you're just using `<script>` tags everywhere!
|
|
84
84
|
|
|
85
85
|
```html
|
|
86
|
-
<script src="https://polyfill.io/v3/polyfill.min.js?features=
|
|
86
|
+
<script src="https://polyfill.io/v3/polyfill.min.js?features=WeakRef,BigInt"></script>
|
|
87
87
|
<script src="https://cdn.jsdelivr.net/npm/superagent"></script>
|
|
88
88
|
<!-- if you wish to use unpkg.com instead: -->
|
|
89
89
|
<!-- <script src="https://unpkg.com/superagent"></script> -->
|
|
@@ -120,38 +120,37 @@ If you are using [browserify][], [webpack][], [rollup][], or another bundler, th
|
|
|
120
120
|
```
|
|
121
121
|
|
|
122
122
|
```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
|
-
|
|
123
|
+
and_chr 102
|
|
124
|
+
and_ff 101
|
|
125
|
+
and_qq 10.4
|
|
126
|
+
and_uc 12.12
|
|
127
|
+
android 101
|
|
128
|
+
chrome 103
|
|
129
|
+
chrome 102
|
|
130
|
+
chrome 101
|
|
131
|
+
chrome 100
|
|
132
|
+
edge 103
|
|
133
|
+
edge 102
|
|
134
|
+
edge 101
|
|
135
|
+
firefox 101
|
|
136
|
+
firefox 100
|
|
137
|
+
firefox 91
|
|
138
|
+
ios_saf 15.5
|
|
139
|
+
ios_saf 15.4
|
|
140
|
+
ios_saf 15.2-15.3
|
|
141
|
+
ios_saf 15.0-15.1
|
|
142
|
+
ios_saf 14.5-14.8
|
|
143
|
+
ios_saf 14.0-14.4
|
|
144
|
+
ios_saf 12.2-12.5
|
|
145
|
+
kaios 2.5
|
|
146
146
|
op_mini all
|
|
147
|
-
op_mob
|
|
148
|
-
|
|
149
|
-
opera
|
|
150
|
-
|
|
151
|
-
safari
|
|
152
|
-
|
|
153
|
-
samsung
|
|
154
|
-
samsung 7.2-7.4
|
|
147
|
+
op_mob 64
|
|
148
|
+
opera 86
|
|
149
|
+
opera 85
|
|
150
|
+
safari 15.5
|
|
151
|
+
safari 15.4
|
|
152
|
+
samsung 17.0
|
|
153
|
+
samsung 16.0
|
|
155
154
|
```
|
|
156
155
|
|
|
157
156
|
### Required Browser Features
|
|
@@ -159,11 +158,11 @@ If you are using [browserify][], [webpack][], [rollup][], or another bundler, th
|
|
|
159
158
|
We recommend using <https://polyfill.io> (specifically with the bundle mentioned in [VanillaJS](#vanillajs) above):
|
|
160
159
|
|
|
161
160
|
```html
|
|
162
|
-
<script src="https://polyfill.io/v3/polyfill.min.js?features=
|
|
161
|
+
<script src="https://polyfill.io/v3/polyfill.min.js?features=WeakRef,BigInt"></script>
|
|
163
162
|
```
|
|
164
163
|
|
|
165
|
-
*
|
|
166
|
-
*
|
|
164
|
+
* WeakRef is not supported in Opera 85, iOS Safari 12.2-12.5
|
|
165
|
+
* BigInt is not supported in iOS Safari 12.2-12.5
|
|
167
166
|
|
|
168
167
|
|
|
169
168
|
## Plugins
|
|
@@ -261,8 +260,6 @@ Our breaking changes are mostly in rarely used functionality and from stricter e
|
|
|
261
260
|
|
|
262
261
|
[yarn]: https://yarnpkg.com/
|
|
263
262
|
|
|
264
|
-
[formdata-polyfill]: https://www.npmjs.com/package/formdata-polyfill
|
|
265
|
-
|
|
266
263
|
[jsdelivr]: https://www.jsdelivr.com/
|
|
267
264
|
|
|
268
265
|
[unpkg]: https://unpkg.com/
|