I'm trying to implement a transport.request SQL query in a manner similar as to what is done in dev tools. Code is shown below:
How do i format the request so i don't get these errors?

handler: async req => {
let param = {
path: '/_sql?format=json',
method: 'POST',
body: {},
querystring: req.payload.query,
param.querystring = "'" + req.payload.query + "'";
console.log('In server route sqlquery:' + JSON.stringify(param));

  const { body, statusCode, headers, warnings } = await client.transport
      method: param.method,
      path: param.path,
      body: {},
      querystring: param.querystring,

In server route sqlquery:{"path":"/_sql?format=json","method":"POST","body":{},"querystring":"'SELECT ObsDate FROM websphere'"}
In server route sqlquery error:"ERR_UNESCAPED_CHARACTERS: /_sql?format=json?'SELECT ObsDate FROM websphere'"

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.