Skip to content

Support for OASIS Request Repeatability Headers #320

@tjprescott

Description

@tjprescott

Describe the issue or request

The Azure API Guidelines say that all operations should be idempotent. This is mainly an issue for POST operations. For situations where a POST needs to be made idempotent, the guidelines recommend

☑️ YOU SHOULD support repeatable requests according as defined in OASIS Repeatable Requests Version 1.0.

Some teams have begun following this advice and including the OASIS Request Repeatability headers in their REST API.

This raises the question of how the Azure SDKs should support OASIS Repeatability headers.

Describe your ideas for solutions

I think we should treat these headers specially -- meaning not simply expose them as optional parameters that are set by the caller. Instead, I think the SDK should set these headers within the method for any operation that supports them.

The headers involved are Repeatability-Request-ID, which the SDK should set to a freshly minted UUID, and Repeatability-First-Sent, which should be set to the current date/time.

The Swift generator should check for the presence of these headers and produce the additional logic as described here.

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