#39;error code&#39;, error.status); // xhr.status
        console.log(&#39;error description&#39;, error.statusText); // xhr.statusText
    });
</code></pre>
<h2 id="-post-"><code>POST</code></h2>
<pre><code class="lang-javascript">atomic(&#39;https://jsonplaceholder.typicode.com/posts&#39;, {
    method: &#39;POST&#39;,
    data: {
        title: &#39;foo&#39;,
        body: &#39;bar&#39;,
        userId: 1
    }
})
    .then(function (response) {
        console.log(&#39;success data&#39;, response.data);