Permalink
Browse files

Merge pull request #11 from andreineculau/master

Update curl template
  • Loading branch information...
2 parents d61dbd9 + 3efd24a commit e9382f7c2018404b5fa04e6fb4325ebcecf7e305 @abtris abtris committed Feb 14, 2014
Showing with 6 additions and 4 deletions.
  1. +6 −4 curl.html
View
@@ -1,8 +1,10 @@
<section name="curl" class="curl">
<p class="ioDesc">Request</p>
- <pre class="incoming"><code class="language-bash">curl --include<% if @headers: %><% for header,value of @headers: %> --header <%= @helpers.escape "#{header}: #{value}" %><% end %> \
- <% end %><% if @method is 'HEAD' : %> -I \
- <% else if @method isnt 'GET' or @body: %> --request <%= @method %> \
+ <pre class="incoming"><code class="language-bash">curl --include \
+ <% if @method is 'HEAD' : %> -I \
+ <% else if @method isnt 'GET' or @body: %> --request <%= @method %><% end %> \
+ --url "<%= @apiUrl %><%= @url %>"<% if @headers: %><% for header,value of @headers: %> \
+ --header <%= @helpers.escape "#{header}: #{value}" %><% end %> \
<% end %><% if @body: %> --data-binary "<%= @body.replace(/(['"])/g, "\\$1") %>" \
- <% end %> "<%= @apiUrl %><%= @url %>"</code></pre>
+ <% end %></code></pre>
</section>

0 comments on commit e9382f7

Please sign in to comment.