Worklight WL.Server.invokeHttp() with DELETE method doesn't accept query param

断了今生、忘了曾经 提交于 2019-12-24 12:35:07

问题


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:


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



来源:https://stackoverflow.com/questions/20578952/worklight-wl-server-invokehttp-with-delete-method-doesnt-accept-query-param

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!