You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* IE 9-10 requires a polyfill for `Promise`, `Array.from`, `Symbol`, `Object.getOwnPropertySymbols`, and `Object.setPrototypeOf`
166
-
* IE 9 requires a polyfill for `window.FormData` (we recommend [formdata-polyfill][])
166
+
* IE 9 requires a polyfill for `window.FormData` (we recommend [formdata-polyfill][]) and `Set`
167
167
168
168
169
169
## Plugins
@@ -212,6 +212,10 @@ For SuperAgent extensions such as couchdb and oauth visit the [wiki](https://git
212
212
213
213
Our breaking changes are mostly in rarely used functionality and from stricter error handling.
214
214
215
+
*[5.x to 6.x](https://github.com/visionmedia/superagent/releases/tag/v6.0.0):
216
+
* Retry behavior is still opt-in, however we now have a more fine-grained list of status codes and error codes that we retry against (see updated docs)
217
+
* A specific issue with Content-Type matching not being case-insensitive is fixed
218
+
* Set is now required for IE 9, see [Required Browser Features](#required-browser-features) for more insight
215
219
*[4.x to 5.x](https://github.com/visionmedia/superagent/releases/tag/v5.0.0):
216
220
* We've implemented the build setup of [Lass](https://lass.js.org) to simplify our stack and linting
217
221
* Unminified browserified build size has been reduced from 48KB to 20KB (via `tinyify` and the latest version of Babel using `@babel/preset-env` and `.browserslistrc`)
Copy file name to clipboardExpand all lines: docs/index.md
+26
Original file line number
Diff line number
Diff line change
@@ -248,6 +248,32 @@ This method has two optional arguments: number of retries (default 1) and a call
248
248
249
249
Use `.retry()` only with requests that are *idempotent* (i.e. multiple requests reaching the server won't cause undesirable side effects like duplicate purchases).
250
250
251
+
All request methods are tried by default (which means if you do not want POST requests to be retried, you will need to pass a custom retry callback).
252
+
253
+
By default the following status codes are retried:
254
+
255
+
*`408`
256
+
*`413`
257
+
*`429`
258
+
*`500`
259
+
*`502`
260
+
*`503`
261
+
*`504`
262
+
*`521`
263
+
*`522`
264
+
*`524`
265
+
266
+
By default the following error codes are retried:
267
+
268
+
*`'ETIMEDOUT'`
269
+
*`'ECONNRESET'`
270
+
*`'EADDRINUSE'`
271
+
*`'ECONNREFUSED'`
272
+
*`'EPIPE'`
273
+
*`'ENOTFOUND'`
274
+
*`'ENETUNREACH'`
275
+
*`'EAI_AGAIN'`
276
+
251
277
## Setting Accept
252
278
253
279
In a similar fashion to the `.type()` method it is also possible to set the `Accept` header via the short hand method `.accept()`. Which references `request.types` as well allowing you to specify either the full canonicalized MIME type name as `type/subtype`, or the extension suffix form as "xml", "json", "png", etc. for convenience:
'Request has been terminated\nPossible causes: the network is offline, Origin is not allowed by Access-Control-Allow-Origin, the page is being unloaded, etc.'
0 commit comments