PDA

View Full Version : Problems when requesting REST service



gaquino
10 Dec 2009, 12:21 PM
Hi,

I'm trying to do a remote request to use my json services, my sample run ok if I use URI with parameters like http://xxxxxxx.com/service?id=0?name=TESTE

But my services use restful style like http://xxxxxxx.com/service/0/TESTE and with this URI my ext don't work.

Anybody here use the same style of remote services ?





var proxy = new Ext.data.HttpProxy({
url: 'http://127.0.0.1:8080/service/monitor',
method: 'get'
});

var dstore = new Ext.data.JsonStore({
url: 'ordermonitor',
proxy: proxy,
fields: ['data', 'status'],
totalProperty: 'total',
root: 'monitors'
});

// reload

dstore.load({
params: {
pattern: document.getElementById('data').value
}});

}