title: Axios can GET but not POST to the same URL
body: <ul>
  <li>I'm building a react app</li>
  <li>In one component I'm writing this GET request which works:</li>
  </ul>
  
  <p><a href="https://i.stack.imgur.com/LnRHm.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/LnRHm.png" alt="get request"></a></p>
  
  <ul>
  <li>In another component I'm writing this POST request:</li>
  </ul>
  
  <p><a href="https://i.stack.imgur.com/pQVTU.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/pQVTU.png" alt="post request"></a></p>
  
  <ul>
  <li>Which then returns this 404 error:</li>
  </ul>
  
  <p><a href="https://i.stack.imgur.com/hA15r.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/hA15r.png" alt="404 error"></a></p>
  
  <p>And I have no idea how my GET works but my POST returns 404:not found when I'm requesting the same file both times?</p>
  
  <p><strong>UPDATE:</strong></p>
  
  <p>I'm running a node.js server now but it's a bit of a frankenstein's monster as this really isn't an area I have an understanding of. Does anyone know what I'm doing wrong?</p>
  
  <pre><code>// Server setup from node.js website
  const http = require('http');
  const hostname = '127.0.0.1';
  const port = 3000;
  
  const server = http.createServer((req, res) =&gt; {
    res.statusCode = 200;
    res.setHeader('Content-Type', 'text/plain');
    res.end('Hello World\n');
  });
  
  server.listen(port, hostname, () =&gt; {
    console.log(`Server running at http://${hostname}:${port}/`);
  });
  
  
  // Trying to listen for data from React app to feed into JSON (broken)
  var express = require("express");
  var myParser = require("body-parser");
  var app = express();
  
  app.use(myParser.urlencoded({extended : true}));
  app.post("/scene-setup.json", function(request, response) {
      console.log(request.body); //This prints the JSON document received (if it is a JSON document)
  });
  app.listen(3001);
  
  
  // Updating JSON file with "obj" (working)
  var jsonfile = require('jsonfile')
  
  var file = './scene-setup.json'
  var obj = {name: 'JP'}
  
  jsonfile.writeFile(file, obj, function (err) {
    console.error(err)
  })
  </code></pre>