为什么我不能使用Grails rest-client-builder插件将JSON主体附加到GET请求

时间:2015-03-19 22:41:52

标签: json rest grails testing functional-testing

执行此操作后,尝试访问我的REST端点request.JSON为空:

RestResponse response = rest.get("http://localhost:8080/${grailsApplication.metadata.'app.name'}/ws/question") {
    json([
        occurrenceId: 'f6f8a9b8-4d52-49c3-9352-155f154fc96c',
        userId: userKeef.alaUserId,
        tags: 'octopus, orange',
        comment: 'whatever'
    ])
}

但它适用于POST请求:rest.post(...

0 个答案:

没有答案