title: Can't get INSERT to work in SPARQLWrapper
body: <p>I've been trying to get SPARQLWrapper to insert a simple triple into GraphDB with no success. I have no trouble with select queries. Here's Python test code that fails:</p>
  
  <pre><code>db = sparqlw.SPARQLWrapper(endpoint)
  query = '''
  INSERT {&lt;http://example.com/123456789876&gt; a owl:Thing .}
  WHERE {}
  '''
  db.setQuery(query)
  db.method = sparqlw.POST
  db.setReturnFormat(sparqlw.JSON)
  db.queryType= sparqlw.INSERT
  result = db.query()
  </code></pre>
  
  <p>It returns these errors:</p>
  
  <pre><code>"urllib.error.HTTPError: HTTP Error 400: Bad Request"
  </code></pre>
  
  <p>and</p>
  
  <pre><code>"SPARQLWrapper.SPARQLExceptions.QueryBadFormed: QueryBadFormed: a bad 
  request has been sent to the endpoint, probably the sparql query is bad 
  formed."
  </code></pre>
  
  <p>Response:
      b'Missing parameter: query'</p>
  
  <p>I've looked everywhere and tried everything suggested and can't get it to work. Grateful for any good leads.</p>
  
  <p>See my added comment on validation of the query. The suggestion that the question is a duplicate and already answered is not applicable.</p>