问题
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