 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;)

var User = {
    list: [],
    loadList: function() {
        return m.request({
            method: &quot;GET&quot;,
            url: &quot;https://rem-rest-api.herokuapp.com/api/users&quot;,
            withCredentials: true,
        })
        .then(function(result) {
            User.list = result.data
        })
    },
}

module.exports = User
</c