Skip to content

Commit

Permalink
Fix #2893 for gh-pages, pending long-term fix
Browse files Browse the repository at this point in the history
  • Loading branch information
dead-claudia committed Jun 8, 2024
1 parent 2089b7a commit 487780f
Show file tree
Hide file tree
Showing 59 changed files with 317 additions and 317 deletions.
4 changes: 2 additions & 2 deletions archive/v1.0.0/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -211,13 +211,13 @@ <h3 id="routing">Routing</h3>
<hr>
<h3 id="xhr">XHR</h3>
<p>Basically, XHR is just a way to talk to a server.</p>
<p>Let&#39;s change our click counter to make it save data on a server. For the server, we&#39;ll use <a href="http://rem-rest-api.herokuapp.com">REM</a>, a mock REST API designed for toy apps like this tutorial.</p>
<p>Let&#39;s change our click counter to make it save data on a server. For the server, we&#39;ll use <a href="http://mithril-rem.fly.dev">REM</a>, a mock REST API designed for toy apps like this tutorial.</p>
<p>First we create a function that calls <code>m.request</code>. The <code>url</code> specifies an endpoint that represents a resource, the <code>method</code> specifies the type of action we&#39;re taking (typically the <code>PUT</code> method <a href="https://en.wiktionary.org/wiki/upsert">upserts</a>), <code>data</code> is the payload that we&#39;re sending to the endpoint and <code>withCredentials</code> means to enable cookies (a requirement for the REM API to work)</p>
<pre><code class="lang-javascript">var count = 0
var increment = function() {
m.request({
method: &quot;PUT&quot;,
url: &quot;//rem-rest-api.herokuapp.com/api/tutorial/1&quot;,
url: &quot;//mithril-rem.fly.dev/api/tutorial/1&quot;,
data: {count: count + 1},
withCredentials: true,
})
Expand Down
16 changes: 8 additions & 8 deletions archive/v1.0.0/simple-application.html
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ <h1 id="simple-application">Simple application</h1>

module.exports = User
</code></pre>
<p>Then we can add an <code>m.request</code> call to make an XHR request. For this tutorial, we&#39;ll make XHR calls to the <a href="http://rem-rest-api.herokuapp.com/">REM</a> API, a mock REST API designed for rapid prototyping. This API returns a list of users from the <code>GET http://rem-rest-api.herokuapp.com/api/users</code> endpoint. Let&#39;s use <code>m.request</code> to make an XHR request and populate our data with the response of that endpoint.</p>
<p>Then we can add an <code>m.request</code> call to make an XHR request. For this tutorial, we&#39;ll make XHR calls to the <a href="http://mithril-rem.fly.dev/">REM</a> API, a mock REST API designed for rapid prototyping. This API returns a list of users from the <code>GET http://mithril-rem.fly.dev/api/users</code> endpoint. Let&#39;s use <code>m.request</code> to make an XHR request and populate our data with the response of that endpoint.</p>
<pre><code class="lang-javascript">// src/models/User.js
var m = require(&quot;mithril&quot;)

Expand All @@ -121,7 +121,7 @@ <h1 id="simple-application">Simple application</h1>
loadList: function() {
return m.request({
method: &quot;GET&quot;,
url: &quot;http://rem-rest-api.herokuapp.com/api/users&quot;,
url: &quot;http://mithril-rem.fly.dev/api/users&quot;,
withCredentials: true,
})
.then(function(result) {
Expand Down Expand Up @@ -320,7 +320,7 @@ <h1 id="simple-application">Simple application</h1>
loadList: function() {
return m.request({
method: &quot;GET&quot;,
url: &quot;http://rem-rest-api.herokuapp.com/api/users&quot;,
url: &quot;http://mithril-rem.fly.dev/api/users&quot;,
withCredentials: true,
})
.then(function(result) {
Expand All @@ -340,7 +340,7 @@ <h1 id="simple-application">Simple application</h1>
loadList: function() {
return m.request({
method: &quot;GET&quot;,
url: &quot;http://rem-rest-api.herokuapp.com/api/users&quot;,
url: &quot;http://mithril-rem.fly.dev/api/users&quot;,
withCredentials: true,
})
.then(function(result) {
Expand All @@ -352,7 +352,7 @@ <h1 id="simple-application">Simple application</h1>
load: function(id) {
return m.request({
method: &quot;GET&quot;,
url: &quot;http://rem-rest-api.herokuapp.com/api/users/:id&quot;,
url: &quot;http://mithril-rem.fly.dev/api/users/:id&quot;,
data: {id: id},
withCredentials: true,
})
Expand Down Expand Up @@ -434,7 +434,7 @@ <h1 id="simple-application">Simple application</h1>
loadList: function() {
return m.request({
method: &quot;GET&quot;,
url: &quot;http://rem-rest-api.herokuapp.com/api/users&quot;,
url: &quot;http://mithril-rem.fly.dev/api/users&quot;,
withCredentials: true,
})
.then(function(result) {
Expand All @@ -446,7 +446,7 @@ <h1 id="simple-application">Simple application</h1>
load: function(id) {
return m.request({
method: &quot;GET&quot;,
url: &quot;http://rem-rest-api.herokuapp.com/api/users/:id&quot;,
url: &quot;http://mithril-rem.fly.dev/api/users/:id&quot;,
data: {id: id},
withCredentials: true,
})
Expand All @@ -458,7 +458,7 @@ <h1 id="simple-application">Simple application</h1>
save: function() {
return m.request({
method: &quot;PUT&quot;,
url: &quot;http://rem-rest-api.herokuapp.com/api/users/:id&quot;,
url: &quot;http://mithril-rem.fly.dev/api/users/:id&quot;,
data: User.current,
withCredentials: true,
})
Expand Down
4 changes: 2 additions & 2 deletions archive/v1.0.1/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -212,13 +212,13 @@ <h3 id="routing">Routing</h3>
<hr>
<h3 id="xhr">XHR</h3>
<p>Basically, XHR is just a way to talk to a server.</p>
<p>Let&#39;s change our click counter to make it save data on a server. For the server, we&#39;ll use <a href="http://rem-rest-api.herokuapp.com">REM</a>, a mock REST API designed for toy apps like this tutorial.</p>
<p>Let&#39;s change our click counter to make it save data on a server. For the server, we&#39;ll use <a href="http://mithril-rem.fly.dev">REM</a>, a mock REST API designed for toy apps like this tutorial.</p>
<p>First we create a function that calls <code>m.request</code>. The <code>url</code> specifies an endpoint that represents a resource, the <code>method</code> specifies the type of action we&#39;re taking (typically the <code>PUT</code> method <a href="https://en.wiktionary.org/wiki/upsert">upserts</a>), <code>data</code> is the payload that we&#39;re sending to the endpoint and <code>withCredentials</code> means to enable cookies (a requirement for the REM API to work)</p>
<pre><code class="lang-javascript">var count = 0
var increment = function() {
m.request({
method: &quot;PUT&quot;,
url: &quot;//rem-rest-api.herokuapp.com/api/tutorial/1&quot;,
url: &quot;//mithril-rem.fly.dev/api/tutorial/1&quot;,
data: {count: count + 1},
withCredentials: true,
})
Expand Down
16 changes: 8 additions & 8 deletions archive/v1.0.1/simple-application.html
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ <h1 id="simple-application">Simple application</h1>

module.exports = User
</code></pre>
<p>Then we can add an <code>m.request</code> call to make an XHR request. For this tutorial, we&#39;ll make XHR calls to the <a href="http://rem-rest-api.herokuapp.com/">REM</a> API, a mock REST API designed for rapid prototyping. This API returns a list of users from the <code>GET https://rem-rest-api.herokuapp.com/api/users</code> endpoint. Let&#39;s use <code>m.request</code> to make an XHR request and populate our data with the response of that endpoint.</p>
<p>Then we can add an <code>m.request</code> call to make an XHR request. For this tutorial, we&#39;ll make XHR calls to the <a href="http://mithril-rem.fly.dev/">REM</a> API, a mock REST API designed for rapid prototyping. This API returns a list of users from the <code>GET https://mithril-rem.fly.dev/api/users</code> endpoint. Let&#39;s use <code>m.request</code> to make an XHR request and populate our data with the response of that endpoint.</p>
<pre><code class="lang-javascript">// src/models/User.js
var m = require(&quot;mithril&quot;)

Expand All @@ -121,7 +121,7 @@ <h1 id="simple-application">Simple application</h1>
loadList: function() {
return m.request({
method: &quot;GET&quot;,
url: &quot;https://rem-rest-api.herokuapp.com/api/users&quot;,
url: &quot;https://mithril-rem.fly.dev/api/users&quot;,
withCredentials: true,
})
.then(function(result) {
Expand Down Expand Up @@ -320,7 +320,7 @@ <h1 id="simple-application">Simple application</h1>
loadList: function() {
return m.request({
method: &quot;GET&quot;,
url: &quot;https://rem-rest-api.herokuapp.com/api/users&quot;,
url: &quot;https://mithril-rem.fly.dev/api/users&quot;,
withCredentials: true,
})
.then(function(result) {
Expand All @@ -340,7 +340,7 @@ <h1 id="simple-application">Simple application</h1>
loadList: function() {
return m.request({
method: &quot;GET&quot;,
url: &quot;https://rem-rest-api.herokuapp.com/api/users&quot;,
url: &quot;https://mithril-rem.fly.dev/api/users&quot;,
withCredentials: true,
})
.then(function(result) {
Expand All @@ -352,7 +352,7 @@ <h1 id="simple-application">Simple application</h1>
load: function(id) {
return m.request({
method: &quot;GET&quot;,
url: &quot;https://rem-rest-api.herokuapp.com/api/users/:id&quot;,
url: &quot;https://mithril-rem.fly.dev/api/users/:id&quot;,
data: {id: id},
withCredentials: true,
})
Expand Down Expand Up @@ -439,7 +439,7 @@ <h1 id="simple-application">Simple application</h1>
loadList: function() {
return m.request({
method: &quot;GET&quot;,
url: &quot;https://rem-rest-api.herokuapp.com/api/users&quot;,
url: &quot;https://mithril-rem.fly.dev/api/users&quot;,
withCredentials: true,
})
.then(function(result) {
Expand All @@ -451,7 +451,7 @@ <h1 id="simple-application">Simple application</h1>
load: function(id) {
return m.request({
method: &quot;GET&quot;,
url: &quot;https://rem-rest-api.herokuapp.com/api/users/:id&quot;,
url: &quot;https://mithril-rem.fly.dev/api/users/:id&quot;,
data: {id: id},
withCredentials: true,
})
Expand All @@ -463,7 +463,7 @@ <h1 id="simple-application">Simple application</h1>
save: function() {
return m.request({
method: &quot;PUT&quot;,
url: &quot;https://rem-rest-api.herokuapp.com/api/users/:id&quot;,
url: &quot;https://mithril-rem.fly.dev/api/users/:id&quot;,
data: User.current,
withCredentials: true,
})
Expand Down
4 changes: 2 additions & 2 deletions archive/v1.1.0-rc.1/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -212,13 +212,13 @@ <h3 id="routing">Routing</h3>
<hr>
<h3 id="xhr">XHR</h3>
<p>Basically, XHR is just a way to talk to a server.</p>
<p>Let&#39;s change our click counter to make it save data on a server. For the server, we&#39;ll use <a href="http://rem-rest-api.herokuapp.com">REM</a>, a mock REST API designed for toy apps like this tutorial.</p>
<p>Let&#39;s change our click counter to make it save data on a server. For the server, we&#39;ll use <a href="http://mithril-rem.fly.dev">REM</a>, a mock REST API designed for toy apps like this tutorial.</p>
<p>First we create a function that calls <code>m.request</code>. The <code>url</code> specifies an endpoint that represents a resource, the <code>method</code> specifies the type of action we&#39;re taking (typically the <code>PUT</code> method <a href="https://en.wiktionary.org/wiki/upsert">upserts</a>), <code>data</code> is the payload that we&#39;re sending to the endpoint and <code>withCredentials</code> means to enable cookies (a requirement for the REM API to work)</p>
<pre><code class="lang-javascript">var count = 0
var increment = function() {
m.request({
method: &quot;PUT&quot;,
url: &quot;//rem-rest-api.herokuapp.com/api/tutorial/1&quot;,
url: &quot;//mithril-rem.fly.dev/api/tutorial/1&quot;,
data: {count: count + 1},
withCredentials: true,
})
Expand Down
16 changes: 8 additions & 8 deletions archive/v1.1.0-rc.1/simple-application.html
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ <h1 id="simple-application">Simple application</h1>

module.exports = User
</code></pre>
<p>Then we can add an <code>m.request</code> call to make an XHR request. For this tutorial, we&#39;ll make XHR calls to the <a href="http://rem-rest-api.herokuapp.com/">REM</a> API, a mock REST API designed for rapid prototyping. This API returns a list of users from the <code>GET https://rem-rest-api.herokuapp.com/api/users</code> endpoint. Let&#39;s use <code>m.request</code> to make an XHR request and populate our data with the response of that endpoint.</p>
<p>Then we can add an <code>m.request</code> call to make an XHR request. For this tutorial, we&#39;ll make XHR calls to the <a href="http://mithril-rem.fly.dev/">REM</a> API, a mock REST API designed for rapid prototyping. This API returns a list of users from the <code>GET https://mithril-rem.fly.dev/api/users</code> endpoint. Let&#39;s use <code>m.request</code> to make an XHR request and populate our data with the response of that endpoint.</p>
<pre><code class="lang-javascript">// src/models/User.js
var m = require(&quot;mithril&quot;)

Expand All @@ -121,7 +121,7 @@ <h1 id="simple-application">Simple application</h1>
loadList: function() {
return m.request({
method: &quot;GET&quot;,
url: &quot;https://rem-rest-api.herokuapp.com/api/users&quot;,
url: &quot;https://mithril-rem.fly.dev/api/users&quot;,
withCredentials: true,
})
.then(function(result) {
Expand Down Expand Up @@ -320,7 +320,7 @@ <h1 id="simple-application">Simple application</h1>
loadList: function() {
return m.request({
method: &quot;GET&quot;,
url: &quot;https://rem-rest-api.herokuapp.com/api/users&quot;,
url: &quot;https://mithril-rem.fly.dev/api/users&quot;,
withCredentials: true,
})
.then(function(result) {
Expand All @@ -340,7 +340,7 @@ <h1 id="simple-application">Simple application</h1>
loadList: function() {
return m.request({
method: &quot;GET&quot;,
url: &quot;https://rem-rest-api.herokuapp.com/api/users&quot;,
url: &quot;https://mithril-rem.fly.dev/api/users&quot;,
withCredentials: true,
})
.then(function(result) {
Expand All @@ -352,7 +352,7 @@ <h1 id="simple-application">Simple application</h1>
load: function(id) {
return m.request({
method: &quot;GET&quot;,
url: &quot;https://rem-rest-api.herokuapp.com/api/users/:id&quot;,
url: &quot;https://mithril-rem.fly.dev/api/users/:id&quot;,
data: {id: id},
withCredentials: true,
})
Expand Down Expand Up @@ -439,7 +439,7 @@ <h1 id="simple-application">Simple application</h1>
loadList: function() {
return m.request({
method: &quot;GET&quot;,
url: &quot;https://rem-rest-api.herokuapp.com/api/users&quot;,
url: &quot;https://mithril-rem.fly.dev/api/users&quot;,
withCredentials: true,
})
.then(function(result) {
Expand All @@ -451,7 +451,7 @@ <h1 id="simple-application">Simple application</h1>
load: function(id) {
return m.request({
method: &quot;GET&quot;,
url: &quot;https://rem-rest-api.herokuapp.com/api/users/:id&quot;,
url: &quot;https://mithril-rem.fly.dev/api/users/:id&quot;,
data: {id: id},
withCredentials: true,
})
Expand All @@ -463,7 +463,7 @@ <h1 id="simple-application">Simple application</h1>
save: function() {
return m.request({
method: &quot;PUT&quot;,
url: &quot;https://rem-rest-api.herokuapp.com/api/users/:id&quot;,
url: &quot;https://mithril-rem.fly.dev/api/users/:id&quot;,
data: User.current,
withCredentials: true,
})
Expand Down
4 changes: 2 additions & 2 deletions archive/v1.1.0/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -212,13 +212,13 @@ <h3 id="routing"><a href="#routing">Routing</a></h3>
<hr>
<h3 id="xhr"><a href="#xhr">XHR</a></h3>
<p>Basically, XHR is just a way to talk to a server.</p>
<p>Let&#39;s change our click counter to make it save data on a server. For the server, we&#39;ll use <a href="http://rem-rest-api.herokuapp.com">REM</a>, a mock REST API designed for toy apps like this tutorial.</p>
<p>Let&#39;s change our click counter to make it save data on a server. For the server, we&#39;ll use <a href="http://mithril-rem.fly.dev">REM</a>, a mock REST API designed for toy apps like this tutorial.</p>
<p>First we create a function that calls <code>m.request</code>. The <code>url</code> specifies an endpoint that represents a resource, the <code>method</code> specifies the type of action we&#39;re taking (typically the <code>PUT</code> method <a href="https://en.wiktionary.org/wiki/upsert">upserts</a>), <code>data</code> is the payload that we&#39;re sending to the endpoint and <code>withCredentials</code> means to enable cookies (a requirement for the REM API to work)</p>
<pre><code class="lang-javascript">var count = 0
var increment = function() {
m.request({
method: &quot;PUT&quot;,
url: &quot;//rem-rest-api.herokuapp.com/api/tutorial/1&quot;,
url: &quot;//mithril-rem.fly.dev/api/tutorial/1&quot;,
data: {count: count + 1},
withCredentials: true,
})
Expand Down
Loading

1 comment on commit 487780f

@dead-claudia
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Performed using the steps detailed in #2893 (comment).

Please sign in to comment.