title: Django rest and axios post
body: <p>So to I'm trying to submit data to my backend django rest. In my backend, If I manually type in the params like so</p>
  
  <p><a href="http://127.0.0.1:8000/api/comments/create/?type=post&amp;slug=first-post" rel="nofollow noreferrer">http://127.0.0.1:8000/api/comments/create/?type=post&amp;slug=first-post</a></p>
  
  <p>the data gets submitted and the comment gets created. I'm using react/redux as a my front end with axios and I've setup my request to submit data the same way. Passing in data, params, etc like so, </p>
  
  <pre><code>export const createComment = (comment) =&gt; {
  return dispatch =&gt; {        
      return  axios.post(`http://127.0.0.1:8000/api/comments/create/`,qs.stringify({
              content: comment.content
          }),
          {
              params: {
                  type: comment.type,
                  slug: comment.slug,
                  parent_id: comment.parent_id
              }, 
              xsrfHeaderName: "X-CSRFToken",
          }
      ).then((response) =&gt; {
          console.log(response);
      }).catch((err) =&gt; {
          console.log(err.message);
      })
   }
  }
  </code></pre>
  
  <p>This is the error I keep getting, </p>
  
  <p>xhr.js:178 POST <a href="http://127.0.0.1:8000/api/comments/create/?type=post&amp;slug=second-post" rel="nofollow noreferrer">http://127.0.0.1:8000/api/comments/create/?type=post&amp;slug=second-post</a> 500 (Internal Server Error)</p>
  
  <p>Can't understand how this continues to be a server error yet when I submit the comment through my django rest the comment successfully goes through. I'm new to this so any help would be appreciated.</p>