{% extends "silk/base/base.html" %} {% load silk_filters %} {% load silk_inclusion %} {% load static %} {% block pagetitle %}Silky - Request - {{ silk_request.path }}{% endblock %} {% block style %} {% endblock %} {% block js %} {% endblock %} {% block onload %} {% endblock %} {% block menu %} {% request_menu request silk_request %} {% endblock %} {% block data %}
{% request_summary silk_request %}
{% if query_params %} {% heading 'Query Parameters' %}
{{ query_params }}
{% endif %} {% heading 'Request Headers' %} {% for k,v in silk_request.headers.items %} {% endfor %}
{{ k.upper }} {{ v }}
{% if silk_request.raw_body %} {% heading 'Raw Request Body' %} {% if silk_request.raw_body|length > 1000 %} The raw request body is {{ silk_request.raw_body|length }} characters long and hence is too big to show here. Click here to view the raw request body. {% else %}
{{ silk_request.raw_body }}
{% endif %} {% endif %} {% if silk_request.body %} {% heading 'Request Body' %} {% if silk_request.body|length > 1000 %} The processed request body is {{ silk_request.body|length }} characters long and hence is too big to show here. Click here to view the request body. {% else %}
This is the body of the HTTP request represented as JSON for easier reading.
{{ silk_request.body }}
{% endif %} {% endif %} {% if silk_request.response.headers %} {% heading 'Response Headers' %} {% for k, v in silk_request.response.headers.items %} {% endfor %}
{{ k.upper }} {{ v }}
{% endif %} {% if silk_request.response.raw_body %} {% heading 'Raw Response Body' %} {% with raw_body=silk_request.response.raw_body_decoded %} {% if raw_body|length > 1000 %} The raw response body is {{ raw_body|length }} characters long and hence is too big to show here. Click here to view the raw response body. {% else %}
{{ raw_body }}
{% endif %} {% endwith %} {% endif %} {% if silk_request.response.body %} {% heading 'Response Body' %}
This is the body of the HTTP response represented as JSON for easier reading.
{% if silk_request.response.body|length > 1000 %} The response body is {{ silk_request.response.body|length }} characters long and hence is too big to show here. Click here to view the response body. {% else %}
{{ silk_request.response.body }}
{% endif %} {% endif %} {% if curl %} {% heading 'Curl' %}
Curl is a command-line utility for transferring data from servers. Paste the following into a terminal to repeat this request via command line.
{{ curl.strip }}
{% endif %} {% if client %} {% heading 'Django Test Client' %}
The following is working python code that makes use of the Django test client. It can be used to replicate this request from within a Django unit test, or simply as standalone Python.
{{ client.strip }}
{% endif %}
{% endblock %}