文檔似乎在插件端以及HTTPBuilder端都缺乏。我試圖通過put方法提交一些json,但它一直告訴我put()不喜歡我餵它的地圖。Grails REST客戶端插件 - PUT正文內容
有沒有人有使用Grails REST客戶端插件的PUT的例子?以下是我已經試過:
withHttp(uri: "http://foo/doo/roo") {
def bodyContent = [
pano: jsonText
]
def json = put(body: bodyContent)
if (json.stat == 'ok') {
wsr.success = true
}
}
錯誤:
No signature of method: com.wbr.pano.PanService.put() is applicable for argument types: (java.util.LinkedHashMap) values: [[body:
{
"class":"com.wbr.platform.Pano",
"errorMessage":"null",
"imageSize":0,
"id":26,
"completed":"2011-03-20 3:50:27.257",
"downloading":"2011-03-20 3:49:12.269",
"processing":"2011-03-20 3:49:42.911",
"uploading":"2011-03-20 3:50:12.107"
}
]]
你可以發佈錯誤消息/ stacktrace你正在得到? – 2011-03-20 20:49:16
添加了錯誤消息。實際的堆棧跟蹤更加神祕。 – Gregg 2011-03-20 21:14:22