rspec_api_documentation 0.5.2 → 0.6.0
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/rspec_api_documentation.rb +1 -1
- data/lib/rspec_api_documentation/api_documentation.rb +1 -0
- data/lib/rspec_api_documentation/client_base.rb +9 -14
- data/lib/rspec_api_documentation/curl.rb +4 -4
- data/lib/rspec_api_documentation/html_writer.rb +15 -0
- data/lib/rspec_api_documentation/oauth2_mac_client.rb +5 -1
- data/lib/rspec_api_documentation/rack_test_client.rb +5 -1
- data/lib/rspec_api_documentation/test_server.rb +3 -4
- data/lib/rspec_api_documentation/wurl_writer.rb +105 -0
- data/templates/assets/img/glyphicons-halflings-white.png +0 -0
- data/templates/assets/img/glyphicons-halflings.png +0 -0
- data/templates/assets/javascripts/application.js +250 -0
- data/templates/assets/javascripts/codemirror.js +3636 -0
- data/templates/assets/javascripts/jquery-1-7-2.js +9401 -0
- data/templates/assets/javascripts/jquery-base64.js +189 -0
- data/templates/assets/javascripts/jquery-livequery.js +226 -0
- data/templates/assets/javascripts/jquery-ui-1-8-16-min.js +791 -0
- data/templates/assets/javascripts/mode/css/css.js +124 -0
- data/templates/assets/javascripts/mode/htmlmixed/htmlmixed.js +85 -0
- data/templates/assets/javascripts/mode/javascript/javascript.js +361 -0
- data/templates/assets/javascripts/mode/xml/xml.js +325 -0
- data/templates/assets/stylesheets/application.css +68 -0
- data/templates/assets/stylesheets/bootstrap.css +4960 -0
- data/templates/assets/stylesheets/codemirror.css +230 -0
- data/templates/rspec_api_documentation/html_example.mustache +52 -9
- data/templates/rspec_api_documentation/html_index.mustache +22 -21
- data/templates/rspec_api_documentation/wurl_example.mustache +241 -0
- data/templates/rspec_api_documentation/wurl_index.mustache +26 -0
- metadata +47 -111
- data/lib/rspec_api_documentation/syntax.rb +0 -33
@@ -0,0 +1,230 @@
|
|
1
|
+
.CodeMirror {
|
2
|
+
line-height: 1em;
|
3
|
+
font-family: monospace;
|
4
|
+
}
|
5
|
+
|
6
|
+
.CodeMirror-scroll {
|
7
|
+
overflow: auto;
|
8
|
+
height: 300px;
|
9
|
+
/* This is needed to prevent an IE[67] bug where the scrolled content
|
10
|
+
is visible outside of the scrolling box. */
|
11
|
+
position: relative;
|
12
|
+
outline: none;
|
13
|
+
}
|
14
|
+
|
15
|
+
.CodeMirror-gutter {
|
16
|
+
position: absolute;
|
17
|
+
left: 0;
|
18
|
+
top: 0;
|
19
|
+
z-index: 10;
|
20
|
+
background-color: #f7f7f7;
|
21
|
+
border-right: 1px solid #eee;
|
22
|
+
min-width: 2em;
|
23
|
+
height: 100%;
|
24
|
+
}
|
25
|
+
|
26
|
+
.CodeMirror-gutter-text {
|
27
|
+
color: #aaa;
|
28
|
+
text-align: right;
|
29
|
+
padding: .4em .2em .4em .4em;
|
30
|
+
white-space: pre !important;
|
31
|
+
}
|
32
|
+
|
33
|
+
.CodeMirror-lines {
|
34
|
+
padding: .4em;
|
35
|
+
white-space: pre;
|
36
|
+
}
|
37
|
+
|
38
|
+
.CodeMirror pre {
|
39
|
+
-moz-border-radius: 0;
|
40
|
+
-webkit-border-radius: 0;
|
41
|
+
-o-border-radius: 0;
|
42
|
+
border-radius: 0;
|
43
|
+
border-width: 0;
|
44
|
+
margin: 0;
|
45
|
+
padding: 0;
|
46
|
+
background: transparent;
|
47
|
+
font-family: inherit;
|
48
|
+
font-size: inherit;
|
49
|
+
padding: 0;
|
50
|
+
margin: 0;
|
51
|
+
white-space: pre;
|
52
|
+
word-wrap: normal;
|
53
|
+
line-height: inherit;
|
54
|
+
color: inherit;
|
55
|
+
}
|
56
|
+
|
57
|
+
.CodeMirror-wrap pre {
|
58
|
+
word-wrap: break-word;
|
59
|
+
white-space: pre-wrap;
|
60
|
+
word-break: normal;
|
61
|
+
}
|
62
|
+
|
63
|
+
.CodeMirror-wrap .CodeMirror-scroll {
|
64
|
+
overflow-x: hidden;
|
65
|
+
}
|
66
|
+
|
67
|
+
.CodeMirror textarea {
|
68
|
+
outline: none !important;
|
69
|
+
}
|
70
|
+
|
71
|
+
.CodeMirror pre.CodeMirror-cursor {
|
72
|
+
z-index: 10;
|
73
|
+
position: absolute;
|
74
|
+
visibility: hidden;
|
75
|
+
border-left: 1px solid black;
|
76
|
+
border-right: none;
|
77
|
+
width: 0;
|
78
|
+
}
|
79
|
+
|
80
|
+
.cm-keymap-fat-cursor pre.CodeMirror-cursor {
|
81
|
+
width: auto;
|
82
|
+
border: 0;
|
83
|
+
background: transparent;
|
84
|
+
background: rgba(0, 200, 0, .4);
|
85
|
+
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr = #6600c800, endColorstr = #4c00c800);
|
86
|
+
}
|
87
|
+
|
88
|
+
/* Kludge to turn off filter in ie9+, which also accepts rgba */
|
89
|
+
.cm-keymap-fat-cursor pre.CodeMirror-cursor:not(#nonsense_id) {
|
90
|
+
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
|
91
|
+
}
|
92
|
+
|
93
|
+
.CodeMirror pre.CodeMirror-cursor.CodeMirror-overwrite {
|
94
|
+
}
|
95
|
+
|
96
|
+
.CodeMirror-focused pre.CodeMirror-cursor {
|
97
|
+
visibility: visible;
|
98
|
+
}
|
99
|
+
|
100
|
+
div.CodeMirror-selected {
|
101
|
+
background: #d9d9d9;
|
102
|
+
}
|
103
|
+
|
104
|
+
.CodeMirror-focused div.CodeMirror-selected {
|
105
|
+
background: #d7d4f0;
|
106
|
+
}
|
107
|
+
|
108
|
+
.CodeMirror-searching {
|
109
|
+
background: #ffa;
|
110
|
+
background: rgba(255, 255, 0, .4);
|
111
|
+
}
|
112
|
+
|
113
|
+
/* Default theme */
|
114
|
+
|
115
|
+
.cm-s-default span.cm-keyword {
|
116
|
+
color: #708;
|
117
|
+
}
|
118
|
+
|
119
|
+
.cm-s-default span.cm-atom {
|
120
|
+
color: #219;
|
121
|
+
}
|
122
|
+
|
123
|
+
.cm-s-default span.cm-number {
|
124
|
+
color: #164;
|
125
|
+
}
|
126
|
+
|
127
|
+
.cm-s-default span.cm-def {
|
128
|
+
color: #00f;
|
129
|
+
}
|
130
|
+
|
131
|
+
.cm-s-default span.cm-variable {
|
132
|
+
color: black;
|
133
|
+
}
|
134
|
+
|
135
|
+
.cm-s-default span.cm-variable-2 {
|
136
|
+
color: #05a;
|
137
|
+
}
|
138
|
+
|
139
|
+
.cm-s-default span.cm-variable-3 {
|
140
|
+
color: #085;
|
141
|
+
}
|
142
|
+
|
143
|
+
.cm-s-default span.cm-property {
|
144
|
+
color: black;
|
145
|
+
}
|
146
|
+
|
147
|
+
.cm-s-default span.cm-operator {
|
148
|
+
color: black;
|
149
|
+
}
|
150
|
+
|
151
|
+
.cm-s-default span.cm-comment {
|
152
|
+
color: #a50;
|
153
|
+
}
|
154
|
+
|
155
|
+
.cm-s-default span.cm-string {
|
156
|
+
color: #a11;
|
157
|
+
}
|
158
|
+
|
159
|
+
.cm-s-default span.cm-string-2 {
|
160
|
+
color: #f50;
|
161
|
+
}
|
162
|
+
|
163
|
+
.cm-s-default span.cm-meta {
|
164
|
+
color: #555;
|
165
|
+
}
|
166
|
+
|
167
|
+
.cm-s-default span.cm-error {
|
168
|
+
color: #f00;
|
169
|
+
}
|
170
|
+
|
171
|
+
.cm-s-default span.cm-qualifier {
|
172
|
+
color: #555;
|
173
|
+
}
|
174
|
+
|
175
|
+
.cm-s-default span.cm-builtin {
|
176
|
+
color: #30a;
|
177
|
+
}
|
178
|
+
|
179
|
+
.cm-s-default span.cm-bracket {
|
180
|
+
color: #cc7;
|
181
|
+
}
|
182
|
+
|
183
|
+
.cm-s-default span.cm-tag {
|
184
|
+
color: #170;
|
185
|
+
}
|
186
|
+
|
187
|
+
.cm-s-default span.cm-attribute {
|
188
|
+
color: #00c;
|
189
|
+
}
|
190
|
+
|
191
|
+
.cm-s-default span.cm-header {
|
192
|
+
color: #a0a;
|
193
|
+
}
|
194
|
+
|
195
|
+
.cm-s-default span.cm-quote {
|
196
|
+
color: #090;
|
197
|
+
}
|
198
|
+
|
199
|
+
.cm-s-default span.cm-hr {
|
200
|
+
color: #999;
|
201
|
+
}
|
202
|
+
|
203
|
+
.cm-s-default span.cm-link {
|
204
|
+
color: #00c;
|
205
|
+
}
|
206
|
+
|
207
|
+
span.cm-header, span.cm-strong {
|
208
|
+
font-weight: bold;
|
209
|
+
}
|
210
|
+
|
211
|
+
span.cm-em {
|
212
|
+
font-style: italic;
|
213
|
+
}
|
214
|
+
|
215
|
+
span.cm-emstrong {
|
216
|
+
font-style: italic;
|
217
|
+
font-weight: bold;
|
218
|
+
}
|
219
|
+
|
220
|
+
span.cm-link {
|
221
|
+
text-decoration: underline;
|
222
|
+
}
|
223
|
+
|
224
|
+
div.CodeMirror span.CodeMirror-matchingbracket {
|
225
|
+
color: #0f0;
|
226
|
+
}
|
227
|
+
|
228
|
+
div.CodeMirror span.CodeMirror-nonmatchingbracket {
|
229
|
+
color: #f22;
|
230
|
+
}
|
@@ -1,7 +1,46 @@
|
|
1
|
+
<!DOCTYPE html>
|
1
2
|
<html>
|
2
3
|
<head>
|
3
4
|
<title>{{resource_name}} API</title>
|
4
|
-
<link rel="stylesheet" href="
|
5
|
+
<link rel="stylesheet" href="/{{url_prefix}}/assets/stylesheets/bootstrap.css"/>
|
6
|
+
<link rel="stylesheet" href="/{{url_prefix}}/assets/stylesheets/codemirror.css"/>
|
7
|
+
<link rel="stylesheet" href="/{{url_prefix}}/assets/stylesheets/application.css"/>
|
8
|
+
<script src="/{{url_prefix}}/assets/javascripts/jquery-1-7-2.js"></script>
|
9
|
+
<script src="/{{url_prefix}}/assets/javascripts/codemirror.js"></script>
|
10
|
+
<script src="/{{url_prefix}}/assets/javascripts/mode/css/css.js"></script>
|
11
|
+
<script src="/{{url_prefix}}/assets/javascripts/mode/htmlmixed/htmlmixed.js"></script>
|
12
|
+
<script src="/{{url_prefix}}/assets/javascripts/mode/javascript/javascript.js"></script>
|
13
|
+
<script src="/{{url_prefix}}/assets/javascripts/mode/xml/xml.js"></script>
|
14
|
+
<script>
|
15
|
+
function mirror(textarea, contentType, options) {
|
16
|
+
$textarea = $(textarea);
|
17
|
+
if ($textarea.val() != '') {
|
18
|
+
if(contentType.indexOf('json') >= 0) {
|
19
|
+
$textarea.val(JSON.stringify(JSON.parse($textarea.val()), undefined, 2));
|
20
|
+
options.json = true;
|
21
|
+
options.mode = 'javascript';
|
22
|
+
} else if (contentType.indexOf('javascript') >= 0) {
|
23
|
+
options.mode = 'javascript';
|
24
|
+
} else if (contentType.indexOf('xml') >= 0) {
|
25
|
+
options.mode = 'xml';
|
26
|
+
} else {
|
27
|
+
options.mode = 'htmlmixed';
|
28
|
+
}
|
29
|
+
}
|
30
|
+
return CodeMirror.fromTextArea(textarea, options);
|
31
|
+
};
|
32
|
+
|
33
|
+
$(function(){
|
34
|
+
$(".request.body").each(function(i, el) {
|
35
|
+
el = $(el);
|
36
|
+
mirror(el.find("textarea")[0], el.data("content-type"), { "readOnly": true, "lineNumbers": true });
|
37
|
+
});
|
38
|
+
$(".response.body").each(function(i, el) {
|
39
|
+
el = $(el);
|
40
|
+
mirror(el.find("textarea")[0], el.data("content-type"), { "readOnly": true, "lineNumbers": true });
|
41
|
+
});
|
42
|
+
});
|
43
|
+
</script>
|
5
44
|
<style>
|
6
45
|
td.required .name:after {
|
7
46
|
float: right;
|
@@ -31,7 +70,7 @@
|
|
31
70
|
|
32
71
|
{{# has_parameters? }}
|
33
72
|
<h3>Parameters</h3>
|
34
|
-
<table class="parameters">
|
73
|
+
<table class="parameters table table-striped table-bordered table-condensed">
|
35
74
|
<thead>
|
36
75
|
<tr>
|
37
76
|
<th>Name</th>
|
@@ -55,17 +94,21 @@
|
|
55
94
|
|
56
95
|
{{# requests }}
|
57
96
|
<h3>Request</h3>
|
97
|
+
|
58
98
|
<h4>Headers</h4>
|
59
|
-
<pre class="request headers">{{
|
99
|
+
<pre class="request headers">{{ request_headers_text }}</pre>
|
100
|
+
|
60
101
|
<h4>Route</h4>
|
61
102
|
<pre class="request route highlight">{{ request_method }} {{ request_path }}</pre>
|
62
|
-
|
103
|
+
|
104
|
+
{{# request_query_parameters_text }}
|
63
105
|
<h4>Query Parameters</h4>
|
64
|
-
<pre class="request query_parameters highlight">{{
|
65
|
-
{{/
|
106
|
+
<pre class="request query_parameters highlight">{{ request_query_parameters_text }}</pre>
|
107
|
+
{{/ request_query_parameters_text }}
|
108
|
+
|
66
109
|
{{# request_body }}
|
67
110
|
<h4>Body</h4>
|
68
|
-
<div class="request body">{{{ request_body }}}</div>
|
111
|
+
<div class="request body" data-content-type="{{ response_content_type }}"><textarea>{{{ request_body }}}</textarea></div>
|
69
112
|
{{/ request_body }}
|
70
113
|
|
71
114
|
{{# curl }}
|
@@ -76,12 +119,12 @@
|
|
76
119
|
{{# response_status }}
|
77
120
|
<h3>Response</h3>
|
78
121
|
<h4>Headers</h4>
|
79
|
-
<pre class="response headers">{{
|
122
|
+
<pre class="response headers">{{ response_headers_text }}</pre>
|
80
123
|
<h4>Status</h4>
|
81
124
|
<pre class="response status">{{ response_status }} {{ response_status_text}}</pre>
|
82
125
|
{{# response_body }}
|
83
126
|
<h4>Body</h4>
|
84
|
-
<div class="response body">{{{ response_body }}}</div>
|
127
|
+
<div class="response body" data-content-type="{{ request_content_type }}"><textarea>{{{ response_body }}}</textarea></div>
|
85
128
|
{{/ response_body }}
|
86
129
|
{{/ response_status }}
|
87
130
|
{{/ requests }}
|
@@ -1,25 +1,26 @@
|
|
1
|
+
<!DOCTYPE html>
|
1
2
|
<html>
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
3
|
+
<head>
|
4
|
+
<title>API Documentation</title>
|
5
|
+
<link rel="stylesheet" href="/{{ url_prefix }}/assets/stylesheets/bootstrap.css"/>
|
6
|
+
</head>
|
7
|
+
<body>
|
8
|
+
<div class="container">
|
9
|
+
<h1>API Documentation</h1>
|
9
10
|
|
10
|
-
|
11
|
-
|
12
|
-
|
11
|
+
{{# sections }}
|
12
|
+
<div class="article">
|
13
|
+
<h2>{{ resource_name }}</h2>
|
13
14
|
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
15
|
+
<ul>
|
16
|
+
{{# examples }}
|
17
|
+
<li>
|
18
|
+
<a href="/{{ url_prefix }}{{ dirname }}/{{ filename }}">{{ description }}</a>
|
19
|
+
</li>
|
20
|
+
{{/ examples }}
|
21
|
+
</ul>
|
22
|
+
</div>
|
23
|
+
{{/ sections }}
|
24
|
+
</div>
|
25
|
+
</body>
|
25
26
|
</html>
|
@@ -0,0 +1,241 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<head>
|
3
|
+
<title>{{resource_name}} API</title>
|
4
|
+
<link rel="stylesheet" href="/{{url_prefix}}/assets/stylesheets/bootstrap.css"/>
|
5
|
+
<link rel="stylesheet" href="/{{url_prefix}}/assets/stylesheets/codemirror.css"/>
|
6
|
+
<link rel="stylesheet" href="/{{url_prefix}}/assets/stylesheets/application.css"/>
|
7
|
+
<script src="/{{url_prefix}}/assets/javascripts/jquery-1-7-2.js"></script>
|
8
|
+
<script src="/{{url_prefix}}/assets/javascripts/jquery-livequery.js"></script>
|
9
|
+
<script src="/{{url_prefix}}/assets/javascripts/jquery-base64.js"></script>
|
10
|
+
<script src="/{{url_prefix}}/assets/javascripts/jquery-ui-1-8-16-min.js"></script>
|
11
|
+
<script src="/{{url_prefix}}/assets/javascripts/codemirror.js"></script>
|
12
|
+
<script src="/{{url_prefix}}/assets/javascripts/mode/css/css.js"></script>
|
13
|
+
<script src="/{{url_prefix}}/assets/javascripts/mode/htmlmixed/htmlmixed.js"></script>
|
14
|
+
<script src="/{{url_prefix}}/assets/javascripts/mode/javascript/javascript.js"></script>
|
15
|
+
<script src="/{{url_prefix}}/assets/javascripts/mode/xml/xml.js"></script>
|
16
|
+
<script src="/{{url_prefix}}/assets/javascripts/application.js"></script>
|
17
|
+
<script>
|
18
|
+
|
19
|
+
</script>
|
20
|
+
<style>
|
21
|
+
td.required .name:after {
|
22
|
+
float: right;
|
23
|
+
content: "required";
|
24
|
+
font-weight: normal;
|
25
|
+
color: #F08080;
|
26
|
+
}
|
27
|
+
|
28
|
+
p {
|
29
|
+
padding: 15px;
|
30
|
+
font-size: 130%;
|
31
|
+
}
|
32
|
+
</style>
|
33
|
+
</head>
|
34
|
+
<body>
|
35
|
+
<div class="container">
|
36
|
+
<h1>{{resource_name}} API</h1>
|
37
|
+
|
38
|
+
<div class="article">
|
39
|
+
<h2>{{ description }}</h2>
|
40
|
+
{{# explanation }}
|
41
|
+
<p class="explanation">
|
42
|
+
{{ explanation }}
|
43
|
+
</p>
|
44
|
+
{{/ explanation }}
|
45
|
+
|
46
|
+
{{# has_parameters? }}
|
47
|
+
<h3>Parameters</h3>
|
48
|
+
<table class="parameters table table-striped table-bordered table-condensed">
|
49
|
+
<thead>
|
50
|
+
<tr>
|
51
|
+
<th>Name</th>
|
52
|
+
<th>Description</th>
|
53
|
+
</tr>
|
54
|
+
</thead>
|
55
|
+
<tbody>
|
56
|
+
{{# parameters }}
|
57
|
+
<tr>
|
58
|
+
<td
|
59
|
+
{{# required }} class="required"{{/ required }}>
|
60
|
+
<span class="name">{{ name }}</span>
|
61
|
+
</td>
|
62
|
+
<td>
|
63
|
+
<span class="description">{{ description }}</span>
|
64
|
+
</td>
|
65
|
+
</tr>
|
66
|
+
{{/ parameters }}
|
67
|
+
</tbody>
|
68
|
+
</table>
|
69
|
+
{{/ has_parameters? }}
|
70
|
+
|
71
|
+
{{# requests }}
|
72
|
+
<div class='request'>
|
73
|
+
<h3>Request</h3>
|
74
|
+
|
75
|
+
<h4>Headers</h4>
|
76
|
+
<pre class="request headers">{{ request_headers_text }}</pre>
|
77
|
+
|
78
|
+
<h4>Route</h4>
|
79
|
+
<pre class="request route highlight">{{ request_method }} {{ request_path }}</pre>
|
80
|
+
|
81
|
+
{{# request_query_parameters_text }}
|
82
|
+
<h4>Query Parameters</h4>
|
83
|
+
<pre class="request query_parameters highlight">{{ request_query_parameters_text }}</pre>
|
84
|
+
{{/ request_query_parameters_text }}
|
85
|
+
|
86
|
+
{{# request_body }}
|
87
|
+
<h4>Body</h4>
|
88
|
+
|
89
|
+
<div class="request body"><textarea>{{ request_body }}</textarea></div>
|
90
|
+
{{/ request_body }}
|
91
|
+
|
92
|
+
{{# curl }}
|
93
|
+
<h4>cURL</h4>
|
94
|
+
<pre class="request">{{ curl }}</pre>
|
95
|
+
{{/ curl }}
|
96
|
+
|
97
|
+
<h4>wURL</h4>
|
98
|
+
|
99
|
+
<div class="wurl_form form-horizontal" id="wurl_form">
|
100
|
+
<form accept-charset="UTF-8" class="new_wurl well" id="new_wurl">
|
101
|
+
<input type="hidden" class="request content_type" value="{{request_content_type}}"/>
|
102
|
+
<input type="hidden" class="response content_type" value="{{response_content_type}}"/>
|
103
|
+
|
104
|
+
<div class="control-group">
|
105
|
+
<label class="control-label">
|
106
|
+
URL
|
107
|
+
</label>
|
108
|
+
|
109
|
+
<div class="controls url">
|
110
|
+
<select id="wurl_request_method" name="wurl[request_method]">
|
111
|
+
<option value="{{ request_method }}" selected="true">{{ request_method }}</option>
|
112
|
+
<option value="GET">GET</option>
|
113
|
+
<option value="POST">POST</option>
|
114
|
+
<option value="PUT">PUT</option>
|
115
|
+
<option value="DELETE">DELETE</option>
|
116
|
+
<option value="HEAD">HEAD</option>
|
117
|
+
</select>
|
118
|
+
<input id="wurl_request_url" name="wurl[request_url]" value="{{ request_path_no_query }}">
|
119
|
+
</div>
|
120
|
+
</div>
|
121
|
+
<div class="control-group">
|
122
|
+
<label class="control-label">
|
123
|
+
Basic Auth
|
124
|
+
</label>
|
125
|
+
|
126
|
+
<div class="controls">
|
127
|
+
<div class="field_pair">
|
128
|
+
<input id="wurl_basic_auth_user" name="wurl[basic_auth_user]" placeholder="username">
|
129
|
+
<input id="wurl_basic_auth_password" name="wurl[basic_auth_password]"
|
130
|
+
placeholder="password">
|
131
|
+
</div>
|
132
|
+
</div>
|
133
|
+
</div>
|
134
|
+
<div class="control-group">
|
135
|
+
<label class="control-label with-button">
|
136
|
+
<a class="btn trash_headers btn-small btn-danger" title="trash all headers"><i
|
137
|
+
class="icon-trash icon-white"></i></a>
|
138
|
+
<a class="btn add_header btn-small btn-inverse" title="add header"><i
|
139
|
+
class="icon-plus icon-white"></i></a>
|
140
|
+
<span class="text">Headers</span>
|
141
|
+
</label>
|
142
|
+
|
143
|
+
<div class="headers controls">
|
144
|
+
<div class="header_pair" style="display:none">
|
145
|
+
<input class="key ui-autocomplete-input" disabled="disabled" id="header_keys_"
|
146
|
+
name="header_keys[]"
|
147
|
+
type="text" autocomplete="off" role="textbox" aria-autocomplete="list"
|
148
|
+
aria-haspopup="true">
|
149
|
+
<input class="value" disabled="disabled" id="header_values_" name="header_values[]"
|
150
|
+
type="text">
|
151
|
+
<a class="btn delete_header btn-small btn-danger" title="delete header"><i
|
152
|
+
class="icon-remove icon-white"></i></a>
|
153
|
+
</div>
|
154
|
+
|
155
|
+
{{# request_headers_hash }}
|
156
|
+
<div class="header_pair">
|
157
|
+
<input class="key ui-autocomplete-input" id="header_keys_" name="header_keys[]"
|
158
|
+
type="text"
|
159
|
+
autocomplete="off" role="textbox" aria-autocomplete="list" aria-haspopup="true"
|
160
|
+
value="{{ name }}">
|
161
|
+
<input class="value" id="header_values_" name="header_values[]" type="text"
|
162
|
+
value="{{ value }}">
|
163
|
+
<a class="btn delete_header btn-small btn-danger" title="delete header"><i
|
164
|
+
class="icon-remove icon-white"></i></a>
|
165
|
+
</div>
|
166
|
+
{{/ request_headers_hash }}
|
167
|
+
|
168
|
+
</div>
|
169
|
+
</div>
|
170
|
+
<div class="control-group">
|
171
|
+
<label class="control-label">
|
172
|
+
<a class="btn trash_queries btn-small btn-danger" title="trash all parameters"><i
|
173
|
+
class="icon-trash icon-white"></i></a>
|
174
|
+
<a class="btn add_param btn-small btn-inverse" title="add parameter"><i
|
175
|
+
class="icon-plus icon-white"></i></a>
|
176
|
+
<span>Query</span>
|
177
|
+
</label>
|
178
|
+
|
179
|
+
<div class="params controls">
|
180
|
+
<div class="param_pair" style="display:none">
|
181
|
+
<input class="key" disabled="disabled" id="param_keys_" name="param_keys[]" type="text">
|
182
|
+
<input class="value" disabled="disabled" id="param_values_" name="param_values[]"
|
183
|
+
type="text">
|
184
|
+
<a class="btn delete_param btn-small btn-danger" title="delete parameter"><i
|
185
|
+
class="icon-remove icon-white"></i></a>
|
186
|
+
</div>
|
187
|
+
{{# request_query_parameters_hash }}
|
188
|
+
|
189
|
+
<div class="param_pair">
|
190
|
+
<input class="key" id="param_keys_" name="param_keys[]" type="text" value="{{ name }}">
|
191
|
+
<input class="value" id="param_values_" name="param_values[]" type="text"
|
192
|
+
value="{{ value }}">
|
193
|
+
<a class="btn delete_param btn-small btn-danger" title="delete parameter"><i
|
194
|
+
class="icon-remove icon-white"></i></a>
|
195
|
+
</div>
|
196
|
+
{{/ request_query_parameters_hash }}
|
197
|
+
|
198
|
+
|
199
|
+
</div>
|
200
|
+
</div>
|
201
|
+
<div class="control-group">
|
202
|
+
<label class="control-label">
|
203
|
+
<span>Body</span>
|
204
|
+
</label>
|
205
|
+
|
206
|
+
<div class="post_body controls">
|
207
|
+
<textarea id="wurl_request_body" name="wurl[request_body]" rows="5"
|
208
|
+
disabled="disabled"
|
209
|
+
class="textarea_disabled">{{ request_body }}</textarea>
|
210
|
+
</div>
|
211
|
+
</div>
|
212
|
+
<div class="control-group">
|
213
|
+
<div class="controls">
|
214
|
+
<input class="clear_fields btn" id="clear_fields" type="button" value="Clear">
|
215
|
+
<input class="give_it_a_wurl btn btn-primary" type="submit" value="Give it a Wurl!">
|
216
|
+
</div>
|
217
|
+
</div>
|
218
|
+
</form>
|
219
|
+
|
220
|
+
<h3><a class="response_anchor"></a>Response</h3>
|
221
|
+
<h4>Headers</h4>
|
222
|
+
<pre class="response headers">{{ response_headers_text }}</pre>
|
223
|
+
|
224
|
+
{{# response_status }}
|
225
|
+
<h4>Status</h4>
|
226
|
+
<pre class="response status">{{ response_status }}</pre>
|
227
|
+
{{/ response_status }}
|
228
|
+
|
229
|
+
{{# response_body }}
|
230
|
+
<h4>Body</h4>
|
231
|
+
|
232
|
+
<div class="response body"><textarea>{{{ response_body }}}</textarea></div>
|
233
|
+
{{/ response_body }}
|
234
|
+
</div>
|
235
|
+
</div>
|
236
|
+
<hr/>
|
237
|
+
{{/ requests }}
|
238
|
+
</div>
|
239
|
+
</div>
|
240
|
+
</body>
|
241
|
+
</html>
|