2022-12-24 05:56:33 -08:00
|
|
|
{% extends "base_plain.html" %}
|
2022-12-18 10:00:21 -08:00
|
|
|
|
|
|
|
{% block title %}Debug JSON{% endblock %}
|
|
|
|
|
|
|
|
{% block content %}
|
|
|
|
<form action="." method="POST">
|
|
|
|
{% csrf_token %}
|
|
|
|
<fieldset>
|
|
|
|
{% include "forms/_field.html" with field=form.uri %}
|
|
|
|
</fieldset>
|
|
|
|
<div class="buttons">
|
|
|
|
<button>Debug</button>
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
{% if result %}
|
2022-12-20 00:19:00 -08:00
|
|
|
|
2023-01-09 08:58:17 -08:00
|
|
|
<div class="debug">
|
|
|
|
<h2>Summary</h2>
|
|
|
|
<div class="debug-section">
|
|
|
|
<div class="field">
|
|
|
|
<span class="name">Status Code:</span>
|
|
|
|
<span class="value">{{ status_code }}</span>
|
|
|
|
</div>
|
2022-12-24 10:05:07 -08:00
|
|
|
|
2023-01-09 08:58:17 -08:00
|
|
|
<div class="field">
|
|
|
|
<span class="name">Content-Type:</span>
|
|
|
|
<span class="value">{{ content_type }}</span>
|
|
|
|
</div>
|
2022-12-24 10:05:07 -08:00
|
|
|
|
2023-01-09 08:58:17 -08:00
|
|
|
<div class="field">
|
|
|
|
<span class="name">Bytes Downloaded:</span>
|
|
|
|
<span class="value">{{ num_bytes_downloaded }}</span>
|
|
|
|
</div>
|
2022-12-24 10:05:07 -08:00
|
|
|
</div>
|
|
|
|
|
2023-01-09 08:58:17 -08:00
|
|
|
<h2>Payload</h2>
|
2022-12-24 10:05:07 -08:00
|
|
|
|
2023-01-09 08:58:17 -08:00
|
|
|
<div class="debug-section">
|
|
|
|
<div class="field payload">
|
|
|
|
<span class="name">Raw Response:
|
|
|
|
<a title="Copy Content"
|
|
|
|
class="copy"
|
|
|
|
_="on click
|
|
|
|
writeText(#raw_response.innerText) into the navigator's clipboard
|
|
|
|
then add .copied
|
|
|
|
wait 2s
|
|
|
|
then remove .copied">
|
|
|
|
<i class="fa-solid fa-copy"></i>
|
|
|
|
</a>
|
|
|
|
</span>
|
|
|
|
<span class="value">
|
|
|
|
<a _="on click
|
2022-12-24 10:05:07 -08:00
|
|
|
toggle .hidden on #raw_response
|
|
|
|
then
|
2023-01-09 08:58:17 -08:00
|
|
|
if my.innerText is 'Hide' set my.innerText to 'Show'
|
|
|
|
else set my.innerText to 'Hide'
|
2022-12-24 10:05:07 -08:00
|
|
|
">Show</a></span>
|
2023-01-09 08:58:17 -08:00
|
|
|
</div>
|
|
|
|
<div id="raw_response" class="hidden">
|
2022-12-24 10:05:07 -08:00
|
|
|
|
2023-01-09 08:58:17 -08:00
|
|
|
{{ raw_result|escape }}
|
|
|
|
</div>
|
2022-12-24 10:05:07 -08:00
|
|
|
|
2023-01-09 08:58:17 -08:00
|
|
|
<div class="field payload">
|
|
|
|
<span class="name">Canonical:
|
|
|
|
<a title="Copy Content"
|
|
|
|
class="copy"
|
|
|
|
_="on click
|
|
|
|
writeText(#canonical_response.innerText) into the navigator's clipboard
|
|
|
|
then add .copied
|
|
|
|
wait 2s
|
|
|
|
then remove .copied">
|
|
|
|
<i class="fa-solid fa-copy"></i>
|
|
|
|
</a>
|
|
|
|
</span>
|
|
|
|
<span class="value">
|
|
|
|
<a _="on click
|
2022-12-24 10:05:07 -08:00
|
|
|
toggle .hidden on #canonical_response
|
|
|
|
then
|
2023-01-09 08:58:17 -08:00
|
|
|
if my.innerText is 'Hide' set my.innerText to 'Show'
|
|
|
|
else set my.innerText to 'Hide'
|
2022-12-24 10:05:07 -08:00
|
|
|
">Show</a></span>
|
2023-01-09 08:58:17 -08:00
|
|
|
</div>
|
|
|
|
<pre id="canonical_response" class="hidden">{{ result }}</pre>
|
2022-12-24 10:05:07 -08:00
|
|
|
</div>
|
2022-12-20 00:19:00 -08:00
|
|
|
</div>
|
2022-12-18 10:00:21 -08:00
|
|
|
{% endif %}
|
2022-12-24 10:05:07 -08:00
|
|
|
|
2022-12-18 10:00:21 -08:00
|
|
|
{% endblock %}
|