Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 32 lines (32 sloc) 1.232 kb
5e71148b » Almad
2012-04-25 Add classes so bad selector engines are worky
1 <section name="javascript" class="javascript">
b62198cb » zdne
2012-11-27 'In' (input) renamed 'to' Request
2 <p class="ioDesc">Request</p>
36372772 » kuba-kubula
2012-11-14 PRE with CODE element with class language
3 <pre class="incoming"><code class="language-javascript">var xhr = new XMLHttpRequest();
4 xhr.open("<%= @method.toUpperCase() %>", "<%= @apiUrl %><%= @url %>");
5 <% for header, value of @headers: %>
6 xhr.setRequestHeader(<%= @helpers.escape header %>, <%= @helpers.escape value %>);
7 <% end %>
8 xhr.onreadystatechange = function () {
9 if (this.readyState == 4) {
10 alert('Status: '+this.status+'\nHeaders: '+JSON.stringify(this.getAllResponseHeaders())+'\nBody: '+this.responseText);
11 }
12 };
3c4e7f91 » Almad
2013-01-14 try to convert to peg.js reality
13 xhr.send(<%= @helpers.escape @body %>);</code></pre>
36372772 » kuba-kubula
2012-11-14 PRE with CODE element with class language
14 <pre class="jsRunCode" style="display: none">
15 var xhr = new XMLHttpRequest();
16 xhr.open('<%= @method.toUpperCase() %>', '<%= @apiUrl %><%= @url %>');
17 <% for header, value of @headers: %>
18 xhr.setRequestHeader(<%= @helpers.escape header %>, <%= @helpers.escape value %>);
19 <% end %>
20 xhr.onreadystatechange = function () {
21 if (this.readyState == 4) {
22 if (typeof cb !== "undefined") {
23 cb(this);
24 }
25 else {
26 alert('Status: '+this.status+'\nHeaders: '+JSON.stringify(this.getAllResponseHeaders())+'\nBody: '+this.responseText);
27 }
28 }
29 };
3c4e7f91 » Almad
2013-01-14 try to convert to peg.js reality
30 xhr.send(<%= @helpers.escape @body %>);
36372772 » kuba-kubula
2012-11-14 PRE with CODE element with class language
31 </pre>
57b29945 » gr2m
2012-04-12 added javascript template
32 </section>
Something went wrong with that request. Please try again.