title: Can't pass req.params when using http-proxy-middleware ... NodeJS/Express
body: <p>I am new to Node, and I can't pass request parameters when using http-proxy-middleware..</p>
  
  <p>It throws me 404 error</p>
  
  <p>This is the express listener:</p>
  
  <pre><code>  app.put("/api/markets/:id",()=&gt;{..code..});
  </code></pre>
  
  <p>This is the axios PUT request:</p>
  
  <pre><code>axios
    .put("/api/markets/" + idToPass, {..Object..})
    .then(res =&gt; {
      console.log(res);
    })
    .catch(err =&gt; {
      console.log(err);
    });
  </code></pre>
  
  <p>And this is the proxyMiddleware:</p>
  
  <pre><code>const proxy = require("http-proxy-middleware");
  
  module.exports = function(app) {
    app.use(proxy("/api/*", { target: "http://localhost:3050" }));
  };
  </code></pre>
  
  <p>My client runs on localhost:3000 (react app)
  And my server is on localhost:3050</p>
  
  <p>When I open my browser network tab to inspect requests I see that call is being made to </p>
  
  <pre><code>localhost:3000/api/markets/idContent
  </code></pre>
  
  <p>not </p>
  
  <pre><code>localhost:3050/api/markets/idContent
  </code></pre>
  
  <p>as it is supposed to.</p>
  
  <p>It works when I send it manually to </p>
  
  <pre><code>localhost:3050/api/markets/idContent
  </code></pre>
  
  <p>How can I fix this, any ideas?</p>
  
  <p>Thx in advance</p>