我正在编写一个需要将数据传递到基于Grails的Web应用程序的Android应用程序。我想在客户端使用Post请求来这样做。我不确定从服务器方面开始。我知道我可能应该使用看起来像这样的代码:request.getParams(),但是我不确定这需要去哪里。有什么建议么?
最佳答案
您将需要创建一个controller。例如
FooController {
def index = {
if (request.status == 'POST')
print request.params
}
}
}
现在发送一个帖子到
http://<url context>/foo/index
。
关于android - 如何在Grails中接收HTTPS发布请求?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11022851/