Note that there are some explanatory texts on larger screens.

plurals
  1. POi need to send a post request from the worklight adapter
    text
    copied!<p>i am using IBM Worklight i need to send a post request to the server from the worklight adapter i am calling in this way i am supposed to get xml content as a response from the server but am getting HTML and it is failing kindly help me same post request am sending through the REST client XML output is coming perfectly</p> <p>my code in adapter is</p> <pre><code> function showAttributes() { var truevar ="True"; var pubvar ="public"; var gridvar = "GridView"; var gvar ="Grid View 1 "; var request = '&lt;rdf:RDF xmlns:dcterms="http://purl.org/dc/terms/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rs="http://www.w3.org/2001/sw/DataAccess/tests/result-set#" xmlns:rrmNav="http://com.ibm.rdm/navigation#" xmlns:rrmViewdata="http://com.rdm/viewdata#" xmlns:rt="https://crizz.net/qw/views" xmlns:rm="http://www.crizz.com/xmlns/rdm/rdf/" xmlns:xsd="http://www.w3.org/2001/XMLSchema#" xmlns:rql="http://www.crizz.com/xmlns/rdm/rql/" xmlns:owl="http://www.w3.org/2002/07/owl#"&gt;' + '&lt;rtm:View rdf:about=""&gt;' + '&lt;rtm:rowquery rdf:parseType="Resource"&gt; ' + ' &lt;rdf:Seq&gt;' + '&lt;rdf:li rdf:resource="https://jazz.net/rtm/folders/_maPswFcdEeCVbIiWC7_0yA"/&gt;'+ '&lt;/rdf:Seq&gt;' + ' &lt;/rql:e2&gt;' + '&lt;rql:op&gt;' + invar + '&lt;/rql:op&gt;' + '&lt;/rdf:_1&gt;' + '&lt;/rql:where&gt;' + '&lt;/rtm:rowquery&gt;' + '&lt;rtm:displayBaseProperties rdf:datatype="http://www.w3.org/2001/XMLSchema#boolean"&gt;' + truevar + '&lt;/rtm:displayBaseProperties&gt;' + '&lt;rrmNav:scope&gt;' + pubvar + '&lt;/rrmNav:scope&gt;'+ '&lt;rtm:ofType&gt;' + gridvar + '&lt;/rtm:ofType&gt;' + '&lt;dcterms:description&gt; &lt;/dcterms:description&gt;' + '&lt;dcterms:title&gt;' + gvar +'&lt;/dcterms:title&gt;' + '&lt;/rtm:View&gt;' + '&lt;/rdf:RDF&gt;'; var input = { method : 'post', returnedContentType : 'application/xml', path : lpath, headers : { 'RP-Request-Type' : 'private', }, body : { contentType: 'text/plain; charset=utf-8', content: request.toString() }, parameters : { 'oslc.query' : 'execute=true&amp;fullObject=false&amp;size=20&amp;count=true&amp;page=1&amp;reuse=false&amp;' } }; return WL.Server.invokeHttp(input); } </code></pre> <p>Is there any mistake in sending the POST request ..please help</p> <p>Thanks in advance</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload