Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Update curl template

Options are now aligned, and ordered based on HTTP appearance
  • Loading branch information...
commit 3efd24a741eb8ff37ecd60a5ae1b490c060c42e4 1 parent d61dbd9
@andreineculau andreineculau authored
Showing with 6 additions and 4 deletions.
  1. +6 −4 curl.html
View
10 curl.html
@@ -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.
Something went wrong with that request. Please try again.