Worklight WL.Server.invokeHttp() with DELETE metho

2019-07-25 04:13发布

I have a Worklight adapter that calls a RESTful method through WL.Server.invokeHttp(). When an http DELETE method is used, the query string parameters do not get added. I'm on Worklight 6.0.

The input is setup like so:

{
   "headers": {
      "Accept": "application\/json",
      "Authorization": "Bearer xxxxxxxxxxxxxxxx",
      "Content-Type": "application\/json"
   },
   "method": "delete",
   "parameters": {
      "messageIds": "r11118,r11119"
   },
   "path": "\/myMessages\/v2\/messages" 
}

and called like: var result=WL.Server.invokeHttp(input);

But I can see from Wireshark that the query params don't get added:

  DELETE /myMessages/v2/messages HTTP/1.1\r\n

If all I do is change the method to a GET, the params are there on Wireshark:

  GET /myMessages/v2/messages?messageIds=r11118%2Cr11119 HTTP/1.1\r\n

1条回答
The star\"
2楼-- · 2019-07-25 04:37

Sounds like a bug. We'll investigate it and fix in next releases if confirmed.

查看更多
登录 后发表回答