#8980 closed defect (fixed)
dojox.rpc.Rest incorrectly adds trailing slash to target
Reported by: | Jarrod Carlson | Owned by: | Kris Zyp |
---|---|---|---|
Priority: | high | Milestone: | 1.4 |
Component: | Dojox | Version: | 1.3.0b3 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
I have a REST-based web service where resources are available.
Assume my services return Foo objects. Thusly,
http://domain.com/foos
returns a list of Foo objects, and
http://domain.com/foo/123
returns the Foo object with an id of '123'.
When I create a JsonRestStore? with a target of "/foos", the dojox.rpc.Rest implementation assumes itself to append a "/" to the target:
62 path = path.match(/\/$/) ? path : (path + '/');
However, my REST server does not support the url "http://domain.com/foos/". It should be "http://domain.com/foos".
dojox.rpc.Rest should not presume itself to add slashes to the target.
Change History (4)
comment:1 Changed 13 years ago by
Milestone: | 1.3 → tbd |
---|---|
Owner: | changed from Adam Peller to Kris Zyp |
comment:2 Changed 13 years ago by
comment:3 Changed 13 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
This should be fixed. By default trailing slashes are still added for backwards compatibility, but you can disable that by allowNoTrailingSlash to true: new dojox.data.JsonRestStore?({allowNoTrailingSlash: true, target:"/MyData"});
comment:4 Changed 13 years ago by
Milestone: | tbd → 1.4 |
---|
We're also seeing a need for flexibility on the trailing slash to allow connecting to projectzero's REST services.