{% macro format_response(r) %} HTTP/{{ r.version }} {{ r.status_code_str }} {{ r.status_phrase }} {% for hdr in r.headers.text %} {{ hdr[0] }}:{{ hdr|header_present -}} {{- hdr[0]|header_description }} {% endfor %} {%- endmacro %}
{{ format_response(nonfinal_response) }}{% endfor %}
{{ format_response(resource.response) }}