Skip to content

Body-less non-idempotent requests (e.g. bare POST) are no longer retried — document and test #17

Description

@OmarAlJarrah

The retry-eligibility refactor changes behavior on two axes, but only the body-bearing axis is documented.

DefaultRetryStep.isRetrySafe / RetryStep.canRetry:

// beforeif (request.method inIDEMPOTENT_METHODS) returntrueval body = request.body ?:returntrue// body-less POST -> retriedreturn body.isReplayable()
// afterval body = request.body ?:return request.method inIDEMPOTENT_METHODS// body-less POST -> NOT retriedreturn body.isReplayable()

So a body-less POST (trigger / activate-style endpoints) flips from retried to not retried. This is arguably the more correct behavior — POST is non-idempotent regardless of whether it carries a body — so the proposal is to keep it. But:

  • The behavior note frames "body-less requests still gate on method idempotency" as if unchanged; for body-less non-idempotent methods this is a real change worth surfacing.
  • There is no test pinning "body-less POST is not retried" — the new tests cover the non-replayable / replayable PUT cases only, which exercise the body axis, not the body-less method axis.

Action

Confirm the intended behavior, state it explicitly in the retry KDoc / behavior note, and add a test on the body-less non-idempotent axis.

Code added on fix/http-stack-correctness-resource-safety (#13).

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions