This ticket is a proposal for bringing a few changes to the protocol base class.
- make the read, create, update and delete methods return an OpenLayers.Protocol.Response object, this is useful for two things:
- for synchronous protocols like Gears and HTML5
- for asynchronous (XHR-based) protocols when the caller needs some data before the response is actually received from the server, e.g. access the request object to abort the XHR request
- make commit return an array of OpenLayers.Protocol.Response objects, for example XHR-based protocols will return one OpenLayers.Protocol.Response object per XHR request, so that caller can abort anyone of them
- introduce new properties to OpenLayers.Protocol.Response
- last to indicate whether the response is the last in a commit, this property is true by default and must be set appropriately by the commit method of protocols
- requestType to indicate if the response corresponds to a "create", "read", "update", or "delete" request, this is useful to commit users to know what kind of response was received
- include the bits of patch-1646-r7729-A0.diff in #1646
Patch to come.