Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: mention DELETE is no-retry be default #241

Merged
merged 1 commit into from
May 15, 2023

Conversation

Lmmmmmm-bb
Copy link
Contributor

@Lmmmmmm-bb Lmmmmmm-bb commented May 14, 2023

In fetch.ts, the DELETE method retries default also is 0

retries = isPayloadMethod(context.options.method) ? 0 : 1;

ofetch/src/utils.ts

Lines 1 to 6 in 9a5cd33

const payloadMethods = new Set(
Object.freeze(["PATCH", "POST", "PUT", "DELETE"])
);
export function isPayloadMethod(method = "GET") {
return payloadMethods.has(method.toUpperCase());
}

@pi0 pi0 changed the title docs: DELETE retry default docs: mention DELETE is no-retry be default May 15, 2023
Copy link
Member

@pi0 pi0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@pi0 pi0 merged commit d4dc638 into unjs:main May 15, 2023
@Lmmmmmm-bb Lmmmmmm-bb deleted the docs/default-retry branch May 15, 2023 09:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants