title: Sending parameters to Rest API for SQL Server
body: <p>I have created a SQL server with a table that has data in on a server I have local access to. I have also created an "API" on that same server to get the information from the SQL server so it can be read by my angular application.</p>
  
  <p>At the moment, I can read the rows in the SQL server and have them displayed in my angular application, but, I want to be able to update the SQL table from my angular app (through the API).</p>
  
  <p>This is my API (<code>sqlserver.js</code>):</p>
  
  <pre><code>var express = require('express');
  var app = express();
  var cors = require('cors');
  
  app.use(cors())
  
  app.get('/', function (req, res) {
  
      var sql = require("msnodesqlv8");
  
      // config for your database
      var config = "server=servername;Database=dataBaseName;Trusted_Connection=Yes;Driver={SQL Server Native Client 11.0}"
      const query = "SELECT * FROM tableName";
      // connect to your database
  
      sql.query(config, query, (err, rows) =&gt; {
          res.send(rows)
       });
  });
  
  
  var server = app.listen(3097, function () {
      console.log('Server is running..');
  });
  </code></pre>
  
  <p>I want to be able to use the query </p>
  
  <p><code>const query = "SELECT * from tableName WHERE ID LIKE &lt;inputFromAngular&gt;"</code></p>
  
  <p>But I am not sure how to get the parameter from angular into the <code>sqlserver.js</code>. (If I can do this then it will lead to updating the SQL Table using <code>SET</code></p>
  
  <p>In my angular app this is how I am calling the <code>sqlserver.js</code> to display the SQL table:</p>
  
  <pre><code>import { HttpClient } from '@angular/common/http';
  
  constructor(
      private httpService: HttpClient
      ) { }
  
  
  this.httpService.get("http://servername:3097").subscribe(response =&gt; {
          console.log(response)
          this.sqlData = response;
        })
  </code></pre>
  
  <p>I have tried using <code>this.httpService.post()</code> but I wasn't sure how to get the parameters in the API?</p>