{% macro render_headers(headers, uri) %}
Headers
Header |
Value |
{% for header, values in headers %}
{{ header }} |
{% if values|length > 1 %}
{% for value in values %}
- {{ value }}
{% endfor %}
{% else %}
{% if header == 'X-Debug-Token-Link' %}
{{ values.0 }}
{% else %}
{{ values.0 }}
{% endif %}
{% endif %}
|
{% endfor %}
{% endmacro %}
{% macro render_body(body) %}
{% if body is not empty %}
Content
{% set lang = csa_guzzle_detect_lang(body) %}
{{ body|csa_guzzle_pretty_print(lang) }}
{% endif %}
{% endmacro %}
{% macro render_infos(info) %}
{% if info and info.total_time %}
Time
{% set wait_time = info.namelookup_time + info.connect_time + info.redirect_time %}
{% set process_time = info.total_time - wait_time %}
Measure |
Duration |
Total |
{{ info.total_time|csa_guzzle_format_duration }} |
Name lookup |
{{ info.namelookup_time|csa_guzzle_format_duration }} |
Connection |
{{ info.connect_time|csa_guzzle_format_duration }} |
{% if info.redirect_time %}
Redirect |
{{ info.redirect_time|csa_guzzle_format_duration }} |
{% endif %}
Process |
{{ process_time | csa_guzzle_format_duration }} |
{% endif %}
{% endmacro %}