为REST Web服务的API的Groovy很好的例子 [英] Good examples of Groovy APIs for RESTful web services

查看:121
本文介绍了为REST Web服务的API的Groovy很好的例子的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在写我的第一个Groovy的API,用于RESTful Web服务。可能有人请提供一些好的开源的例子或最佳做法,激发我的API设计?

I'm writing my first Groovy API for a RESTful web service. Could someone please provide some good open-source examples or best-practices to inspire my API design?

我使用Groovy的expandos的,XML解析,以及直接的URL请求机制考虑,但我想听听其他的方法来进行API的Groovy。想法?

I'm considering using Groovy's Expandos, XML Parsing, and straight-forward URL request mechanism, but I'd like to hear other ways to make an API Groovy. Ideas?

推荐答案

HTTP生成器对Groovy有一个很好的RESTClient实现,使调用基于REST的服务清洁容易:

HTTP Builder for Groovy has a nice restclient and makes calling REST based services clean and easy:

HTTP://groovy.$c$chaus。组织/模块/ HTTP建设者/ DOC / rest.html

如果您需要生产而非消费REST服务,我建议看Grails的:

If you need to produce rather than consume a REST service, I'd recommend looking at Grails:

http://grails.org/doc /1.1/guide/13.%20Web%20Services.html#13.1%20REST

这篇关于为REST Web服务的API的Groovy很好的例子的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆