{% if query_params %}
{% heading 'Query Parameters' %}
{{ query_params }}
{% endif %}
{% heading 'Request Headers' %}
{% 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' %}
{% 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 %}