-
Notifications
You must be signed in to change notification settings - Fork 28
java_opensearch
Restfulie client supports opensearch with both xml and json out of the box. Atom support can be included by adding a media type handler for atom.
The opensearch media type handler allows unmarshalling an open search descriptor file, such as:
SearchDescription description = restfulie.at("http://localhost:3000/products/opensearch.xml").accept("application/opensearchdescription+xml").get().getResource();
And now, a description object can be searched by invoking the use method:
items = description.use("application/xml").search(:searchTerms => what, :startPage => 1)
List items = desc.use("application/xml").with(queryFor(term)).and(page(page)).get().getResource();
There is a sample application showcasing open search usage on the client side at restfulie-restbuy.