Skip to content

Commit 1a49ea5

Browse files
author
Emmanouil Konstantinidis
committed
Response, nice json
1 parent d5ac99a commit 1a49ea5

File tree

2 files changed

+10
-2
lines changed
  • rest_framework_docs

2 files changed

+10
-2
lines changed

rest_framework_docs/static/rest_framework_docs/js/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ $( document ).ready(function() {
1616

1717
$('#responseStatusCode').text(response.status);
1818
$('#responseStatusText').text(response.statusText);
19-
$('#responseData').text(JSON.stringify(response.responseJSON));
19+
$('#responseData').text(JSON.stringify(response.responseJSON, undefined, 2));
2020

2121
console.log(response);
2222
console.log(response.responseJSON);

rest_framework_docs/templates/rest_framework_docs/home.html

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ <h2 class="text-center">No endpoints found for {{ query }}.</h2>
9393
<div class="modal-content">
9494
<div class="modal-header">
9595
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
96-
<h4 class="modal-title" id="myModalLabel">Modal title</h4>
96+
<h4 class="modal-title">Live API Endpoints</h4>
9797
</div>
9898
<div class="modal-body">
9999

@@ -106,6 +106,14 @@ <h3>Request</h3>
106106
<label for="urlInput">Endpoint</label>
107107
<input type="text" class="form-control" id="urlInput" placeholder="Url">
108108
</div>
109+
110+
<h5>Headers</h5>
111+
<div class="form-group">
112+
<label for="exampleInputPassword1">Authorization</label>
113+
<input type="text" class="form-control" id="exampleInputPassword1" placeholder="Token">
114+
</div>
115+
116+
<h5>Data</h5>
109117
<div class="form-group">
110118
<label for="exampleInputPassword1">Password</label>
111119
<input type="password" class="form-control" id="exampleInputPassword1" placeholder="Password">

0 commit comments

Comments
 (0)