Related Documentation : Cache Server User Guide : Using the RESTful Services : RESTful Code Samples : Ruby Code Samples
Ruby Code Samples
GET
require 'rubygems'
require 'open-uri'
require 'rexml/document'
response = open('http://localhost:8080/ehcache/rest/sampleCache2/2')
xml = response.read
puts xml
The server responds with:
<?xml version="1.0"?>
<oldjoke>
<burns>Say <quote>goodnight</quote>,
Gracie.</burns>
<allen><quote>Goodnight,
Gracie.</quote></allen>
<applause/>
</oldjoke>
Copyright © 2010-2015 Software AG, Darmstadt, Germany.

Product Logo |   Feedback