Skip to content

lro-location-header

Id
@azure-tools/typespec-azure-resource-manager/lro-location-header

A 202 response should include a Location response header.

The header tells clients where to poll after a 202 response from a long-running operation.

  • Area: API

A long-running operation without the standard Location header violates the RPC contract.

This rule corresponds to the LintDiff rule LroLocationHeader.

@armResourceOperations
interface Employees {
delete is ArmResourceDeleteWithoutOkAsync<Employee, EmployeeProperties, LroHeaders = {}>;
}
@armResourceOperations
interface Employees {
delete is ArmResourceDeleteWithoutOkAsync<Employee, EmployeeProperties>;
}

Suppress per the RPC guidelines; otherwise use the standard Async templates.