title: Insert data through SPARQL over HTTP POST request from node js
body: <p>I am using 'request' module in my node app to POST data in ontology model which resides in a fuseki server. I am using the following code:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>var request = require('request');
  var querystring = require('querystring');
  
  var myquery = querystring.stringify({update: "PREFIX test:&lt;http://www.semanticweb.org/muhammad/ontologies/2017/2/untitled-ontology-14#&gt; INSERT { ?KPIs test:hasValue 2009} WHERE { ?KPIs test:hasValue ?Newvalue}"});
  
  
  request.post('http://localhost:3030/DS-1/sparql?'+myquery, function (error, response, body) {
    if (!error &amp;&amp; response.statusCode == 200) {
     // Show the HTML for the Google homepage.
  console.log('successful update');
  console.log(body);
  
    } else {
     console.log(response.statusCode);
     console.warn(error);
    }
  });</code></pre>
  </div>
  </div>
  </p>
  
  <p>PS: When I use POSTMAN to send the Post request to insert data it works fine but from my node app, it doesn't. it shows error 'bad request 400'.
  P.S: GET methods work fine from both POSTMAN and node app.</p>