Monday, July 25, 2011

Handle Parameters Override for RESTful service

1. Allow the user of the RESTful Service to be able to specify parameter that overrides attributes in the header is good practice since it is not always convenient for the user writing the client application to specify the attributes in the request header

2. For example, dojox.rpc.REST(<url>, <isJson>), a nice functionality, but you can't really explicitly specify what the 'Content-type' is except for whether it is application/json or not. But if the corresponding RESTful service handles parameter override, then the user can conveniently just put that into the <url>.

3. Arguably this deviate from the how REST should be different RPC, but practically, who cares?

No comments:

Post a Comment