@startuml
!include ../../copyright.iuml

title Response with Async Timeout

actor Client
participant "<&project> Async" as Async

Client -> Async: PUT / POST / PATCH / DELETE
rnote right #lightblue
  <#lightblue,lightblue>|= Header |= Value |
  | ""Prefer:"" | ""respond=async; wait=""//seconds// |
end note
hnote over Async #lightsteelblue
  ""    payload""
  //omitted for DELETE//
end note
Async --> Client: 201 Created / 204 No Content
rnote left #lightgreen
  <#lightgreen,lightgreen>|= Header |= Value |
  | *""Location:"" | //URL// |

  // *""POST"" only//
end note
...
group timeout: wait time exceeded
  Async --> Client: 202 Accepted
  rnote left #lightgreen
    <#lightgreen,lightgreen>|= Header |= Value |
    | *""Location:"" | //URL// |
    | ""Preference-Applied:"" | ""respond=async"" |

    // *""POST"" only//
  end note
end group

@enduml