{{define "delivery_attempts"}} {{if .AttemptsOmitted}}

{{.AttemptsOmitted}} attempt{{if ne .AttemptsOmitted 1}}s{{end}} omitted between the first and last shown.

{{end}} {{range .Results}}
Attempt {{.AttemptNum}} {{if .Success}}success{{else}}failure{{end}} Status: {{if .HasStatusCode}}{{.StatusCode}}{{else}}— (no response){{end}} Duration: {{.DurationMS}} ms
{{if .Error}}

Error: {{.Error}}

{{end}} {{if .ResponseBody}}
{{.ResponseBody}}
{{end}} {{if .ResponseTruncated}} {{if .ResponseSizeKnown}}

Response truncated for display: showing {{.ResponseShownBytes}} of {{.ResponseBytes}} bytes.

{{else}}

Showing {{.ResponseShownBytes}} of the {{.ResponseBytes}} recorded bytes. The response reached the recording limit, so the remote may have sent more that was never stored.

{{end}} {{end}}
{{else}}

No attempts recorded yet.

{{end}} {{end}}