Commit b6907d8
Allow Promise return type for onBeforeRequest and onAfterResponse. (#212)
* Allow Promise return type for onBeforeRequest and onAfterResponse.
* Allow Promise return type for onBeforeRequest and onAfterResponse: documentation and test case.
* Allow to specify options for Node's request method (#203)
* adding nodejs HttpStack request options
* fix
* fix
* fix
* visual fix
* proposal for request options
* disabling browser
* fix
* Clarify how to import using ESM syntax
* Added onShouldRetry callback for controlling retries (#198)
* Added onShouldRetry callback for controlling retry
Whenever the library is about to retry an upload due to an
error, the new optional callback onShouldRetry will be
called when defined. Its return value will tell the library whether
to actually retry the upload or fail with an error, for example
based on status code checks.
This makes it possible to customize the behavior like reacting on
specific status codes.
* Move onShouldRetry example to usage.md
* Refactored shouldRetry logic
- isOnline is now excluded from the check, so the onShouldRetry callback
should manually add an online check if desired
- removed inline function and made the conditions more readable
- clarified inline comments about status code check
* Add test assertion for onShouldRetry arguments
* Update usage.md
* Update test-common.js
* Update api.md
Co-authored-by: Marius <[email protected]>
* making property 'private', adding small test for 'insecure' request
* fixes ?
* fix: import
* Update js-base64 to a version which does not use eval() anymore
Closes #147
* PR comments fixes
* fixed exports on node, addex HttpStack export on browser
* added new test case - node 14
* test fixes
* test fixes
* fix tests
* Bump lodash from 4.17.14 to 4.17.19
Bumps [lodash](https://github.com/lodash/lodash) from 4.17.14 to 4.17.19.
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](lodash/lodash@4.17.14...4.17.19)
Signed-off-by: dependabot[bot] <[email protected]>
* Clean up request initialization and add proper test
Co-authored-by: Dragos Cirjan <[email protected]>
Co-authored-by: Dragos Cirjan <[email protected]>
Co-authored-by: Marius <[email protected]>
Co-authored-by: Vincent Petry <[email protected]>
Co-authored-by: Marius <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Kevin van Zonneveld <[email protected]>
* Bump elliptic from 6.3.1 to 6.5.3 (#214)
Bumps [elliptic](https://github.com/indutny/elliptic) from 6.3.1 to 6.5.3.
- [Release notes](https://github.com/indutny/elliptic/releases)
- [Commits](indutny/elliptic@v6.3.1...v6.5.3)
Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Update dependencies using 'npm audit fix'
* Do not pass URL as separate parameter
This is not supported in Node.js 8 and 9.
* Downgrade tsd to support Node.js 8 and 9
See https://github.com/SamVerschueren/tsd/releases/tag/v0.12.1
* Correct type definition for Upload#terminate (#217)
inconsistency between typescript typing and function definition
* Minor cleanups
Co-authored-by: Dragos Cirjan <[email protected]>
Co-authored-by: Dragos Cirjan <[email protected]>
Co-authored-by: Dragos Cirjan <[email protected]>
Co-authored-by: Marius <[email protected]>
Co-authored-by: Vincent Petry <[email protected]>
Co-authored-by: Marius <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Kevin van Zonneveld <[email protected]>
Co-authored-by: kabaliserv <[email protected]>1 parent 46d7471 commit b6907d8
3 files changed
+86
-12
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
227 | 227 | | |
228 | 228 | | |
229 | 229 | | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
230 | 242 | | |
231 | 243 | | |
232 | 244 | | |
| |||
241 | 253 | | |
242 | 254 | | |
243 | 255 | | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
244 | 269 | | |
245 | 270 | | |
246 | 271 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
834 | 834 | | |
835 | 835 | | |
836 | 836 | | |
837 | | - | |
838 | | - | |
839 | | - | |
840 | | - | |
841 | | - | |
842 | | - | |
843 | | - | |
844 | | - | |
845 | | - | |
846 | | - | |
847 | | - | |
848 | | - | |
| 837 | + | |
| 838 | + | |
| 839 | + | |
| 840 | + | |
| 841 | + | |
| 842 | + | |
| 843 | + | |
| 844 | + | |
| 845 | + | |
| 846 | + | |
| 847 | + | |
| 848 | + | |
| 849 | + | |
| 850 | + | |
849 | 851 | | |
850 | 852 | | |
851 | 853 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1248 | 1248 | | |
1249 | 1249 | | |
1250 | 1250 | | |
| 1251 | + | |
| 1252 | + | |
| 1253 | + | |
| 1254 | + | |
| 1255 | + | |
| 1256 | + | |
| 1257 | + | |
| 1258 | + | |
| 1259 | + | |
| 1260 | + | |
| 1261 | + | |
| 1262 | + | |
| 1263 | + | |
| 1264 | + | |
| 1265 | + | |
| 1266 | + | |
| 1267 | + | |
| 1268 | + | |
| 1269 | + | |
| 1270 | + | |
| 1271 | + | |
| 1272 | + | |
| 1273 | + | |
| 1274 | + | |
| 1275 | + | |
| 1276 | + | |
| 1277 | + | |
| 1278 | + | |
| 1279 | + | |
| 1280 | + | |
| 1281 | + | |
| 1282 | + | |
| 1283 | + | |
| 1284 | + | |
| 1285 | + | |
| 1286 | + | |
| 1287 | + | |
| 1288 | + | |
| 1289 | + | |
| 1290 | + | |
| 1291 | + | |
| 1292 | + | |
| 1293 | + | |
| 1294 | + | |
| 1295 | + | |
| 1296 | + | |
| 1297 | + | |
1251 | 1298 | | |
1252 | 1299 | | |
0 commit comments