如何在grails中安装和使用httpbuilder插件 [英] How to install and use httpbuilder plugin in grails
本文介绍了如何在grails中安装和使用httpbuilder插件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何在Grails中安装和使用httpbuilder插件?
解决方案
-
安装:
grails install-plugin rest
-
示例:
withHttp(uri:http://www.google .com)){
def html = get(path:'/ search',query:[q:'Groovy'])
assert html.HEAD.size()== 1
断言html.BODY.size()== 1
}
How to install and use httpbuilder plugin in Grails?
解决方案
There is the REST Client plugin:
Installation:
grails install-plugin rest
Example:
withHttp(uri: "http://www.google.com") { def html = get(path : '/search', query : [q:'Groovy']) assert html.HEAD.size() == 1 assert html.BODY.size() == 1 }
这篇关于如何在grails中安装和使用httpbuilder插件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文