Permalink
Browse files

Update curl template

Options are now aligned, and ordered based on HTTP appearance
  • Loading branch information...
1 parent d61dbd9 commit 3efd24a741eb8ff37ecd60a5ae1b490c060c42e4 @andreineculau andreineculau committed Feb 12, 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 3efd24a

Please sign in to comment.