Good point. And I would expect REST urls look very different from what we have.
E.g. HTTP GET http://host:port/ignite/cache/{cacheName}/{key} would return a value for the key, HTTP PUT for the same url would update the value, etc. HTTP GET should never modify anything. On Wed, Oct 21, 2015 at 5:29 PM, endian675 <[email protected]> wrote: > The replace() method requires a key and a newVal to be supplied, both of > type > String. If my newVal is of type JSON then I have to put this data on the > URI as replace() is an HTTP GET method. If this JSON has non-URI safe > characters (very likely it will) then it has to be URLEncoded. However, it > is not URL-decoded when inserted into the cache. > > If I do > > ignite/?cmd=replace&key=mykey&value=<URL-encoded json-data>&cacheName=c > > followed by > > ignite /?cmd=get&key=mykey > > then the data that is returned from the get() has all of the double quotes > escaped with the "\" character. > > Does anyone have any suggestions? My opinion is that methods like > replace(), put(), etc., should be POST not GET. > > > > -- > View this message in context: > http://apache-ignite-users.70518.x6.nabble.com/Replace-via-REST-API-tp1661.html > Sent from the Apache Ignite Users mailing list archive at Nabble.com. > -- -- Pavel Tupitsyn GridGain Systems, Inc. www.gridgain.com
