title: Is there a way through which i can access a request parameter outside the request in nodejs, expressjs
body: <p>I am currently developing a utility using nodejs, expressjs, neo4j, d3.js for visualization but I m stuck up in a particular use case. i.e. search feature what I am doing is taking the search parameter from the user through a form using post request. and then passing the parameter to another get request where I am executing the query in neo4j using that parameter and that get request is used for taking data for visualization in d3.js. But the problem that I am not able to pass the parameter from one (post) request to another (get)request. please let me know how can I achieve this or is there any other better approach that I can use</p>
  
  <p>form code:</p>
  
  <pre><code>&lt;form method="post" action="/api/xyz"&gt;
                              &lt;h4&gt; Name&lt;/h4&gt;
                              &lt;div class="item"&gt;
                                  &lt;input id="name" type="text" name="searchname" required/&gt;
                              &lt;/div&gt;
                              &lt;div class="btn-block"&gt;
                                  &lt;button type="submit" href="/"&gt;Search&lt;/button&gt;
                              &lt;/div&gt;
                          &lt;/form&gt;
  </code></pre>
  
  <p>post request:</p>
  
  <pre><code>router.post('/xyz',(req,res,next)=&gt;{
      proteinname = req.body.proteinname
      console.log(proteinname)
      res.render('searchresult')
  })
  </code></pre>
  
  <p>get request: </p>
  
  <pre><code>router.get('/xyz',(req,res,next)=&gt;{
   name = proteinname 
       session
           .run('Match(a:Protein {name:{nameParam}})-[r]-&gt;(b:Protein) Return a, b,r LIMIT 10',{nameParam:name})
           .then(function(neoresult){
  res.send(neoresult)
  })
  </code></pre>