title: How do you set crumb for Jenkins using Axios?
body: <p>I have been trying to set the crumb for triggering a Jenkins job. But it doesn't seem to work or I am doing something wrong. Here is my code:</p>
  <pre><code>// Use the crumb in the post call
  axios.post(`${url}/job/${job_name}/build?token=${token}`,
  {}, 
  {
      headers: {
          &quot;Accept&quot;: &quot;application/json&quot;,
          &quot;Content-Type&quot;: &quot;application/json&quot;,
          &quot;Jenkins-Crumb&quot;: r.data.crumb
      }
  }).then(r =&gt; console.log(r))
  .catch(r =&gt; console.log(r))
  </code></pre>
  <p>I keep getting the 'No valid crumb' error, I am getting the crumb from the <code>crumbIssuer</code> API properly. Been trying for quite some time now. Do I need the token at all, if I am using a crumb? Do I need the username/password again if I am using a token/crumb?</p>
  <p>Please help, stuck here.</p>