Skip to content

Enable retry on non-GET requests? #34

@AaronHarris

Description

@AaronHarris

Hi,

I was curious why the built-in retry logic only functions for GET requests. Could it be extended so clients could retry for POST requests, or whatever method is used for the request? This is something we have a use case for (yes, I am aware of the dangers in general in retrying a failed POST request, we have a use case where this is desired behavior).

Ie. Would a pull request that modified this line https://github.com/then/then-request/blob/master/src/browser.ts#L65 be accepted

-if (options.retry && method === 'GET') {
+if (options.retry) {

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions