Skip to content

Commit 8ad3b07

Browse files
committed
Merge pull request #3 from jeroenvisser101/patch-1
A bit of code cleanup
2 parents d68d2ac + 33f92ea commit 8ad3b07

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

javascript.mustache

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,38 +4,38 @@ $.ajax({
44
url: "{{{url.base}}}",
55
type: "{{{request.method}}}",
66
{{#url.has_params}}
7-
data:{
7+
data: {
88
{{#url.params}}
9-
"{{{name}}}":"{{{value}}}",
9+
"{{{name}}}": "{{{value}}}",
1010
{{/url.params}}
1111
},
1212
{{/url.has_params}}
1313
{{#headers.has_headers}}
14-
headers:{
14+
headers: {
1515
{{#headers.header_list}}
16-
"{{{header_name}}}":"{{{header_value}}}",
16+
"{{{header_name}}}": "{{{header_value}}}",
1717
{{/headers.header_list}}
1818
},
1919
{{/headers.has_headers}}
2020
{{#body.has_raw_body}}
21-
processData:false,
22-
data:"{{{body.raw_body}}}",
21+
processData: false,
22+
data: "{{{body.raw_body}}}",
2323
{{/body.has_raw_body}}
2424
{{#body.has_long_body}}
25-
processData:false,
26-
data:"", // set your body string
25+
processData: false,
26+
data: "", // set your body string
2727
{{/body.has_long_body}}
2828
{{#body.has_url_encoded_body}}
29-
contentType:"application/x-www-form-urlencoded",
30-
data:{
29+
contentType: "application/x-www-form-urlencoded",
30+
data: {
3131
{{#body.url_encoded_body}}
32-
"{{{name}}}":"{{{value}}}",
32+
"{{{name}}}": "{{{value}}}",
3333
{{/body.url_encoded_body}}
3434
},
3535
{{/body.has_url_encoded_body}}
3636
{{#body.has_json_body}}
37-
contentType:"application/json",
38-
data:JSON.stringify({{{body.json_body_object}}})
37+
contentType: "application/json",
38+
data: JSON.stringify({{{body.json_body_object}}})
3939
{{/body.has_json_body}}
4040
})
4141
.done(function(data, textStatus, jqXHR) {

0 commit comments

Comments
 (0)