# ScanAPI Report

{% for response in responses %}
{% set request = response.request %}
## {{ request.method }} `{{ request.path_url }}`

### Request

Full URL: {{ request.url }}

#### Headers

{% if request.headers|length > 0 %}
| Header    | Value       |
|-----------|-------------|
{% for key, value in request.headers.items() -%}
| {{ key }} | {{ value }} |
{% endfor %}
{% else %}
None
{% endif %}

{% if ( request.body and request.body.decode("UTF-8") != "{}" ) %}

#### Body
<details><summary></summary><p>

```json
{{ request.body }}
```

{% endif %}

</p></details>

#### cURL

<details><summary></summary><p>

```
{{request|curlify}}
```

</p></details>

### Response

#### Metadata

|               |                                          |
|---------------|------------------------------------------|
| response time | {{ response.elapsed.total_seconds() }} s |
| status code   | {{ response.status_code }}               |
| redirect      | {{ response.is_redirect }}               |

#### Headers

{% if response.headers|length > 0 %}
| Header    | Value       |
|-----------|-------------|
{% for key, value in response.headers.items() -%}
| {{ key }} | {{ value }} |
{% endfor %}
{% else %}
None
{% endif %}

#### Content
<details><summary></summary><p>

{% if response.text %}
```
{{ response.text }}
```
{% else %}
```json
{{ response.content }}
```
{% endif %}

</p></details>

{% endfor %}
