Request.js 1.3 KB

123456789101112131415161718192021222324252627282930313233
  1. define(["../../_base/declare"], function(declare){
  2. // module:
  3. // dojo/data/api/Request
  4. return declare("dojo.data.api.Request", null, {
  5. // summary:
  6. // This class defines out the semantics of what a 'Request' object looks like
  7. // when returned from a fetch() method. In general, a request object is
  8. // nothing more than the original keywordArgs from fetch with an abort function
  9. // attached to it to allow users to abort a particular request if they so choose.
  10. // No other functions are required on a general Request object return. That does not
  11. // inhibit other store implementations from adding extensions to it, of course.
  12. //
  13. // This is an abstract API that data provider implementations conform to.
  14. // This file defines methods signatures and intentionally leaves all the
  15. // methods unimplemented.
  16. //
  17. // For more details on fetch, see dojo/data/api/Read.fetch().
  18. abort: function(){
  19. // summary:
  20. // This function is a hook point for stores to provide as a way for
  21. // a fetch to be halted mid-processing.
  22. // description:
  23. // This function is a hook point for stores to provide as a way for
  24. // a fetch to be halted mid-processing. For more details on the fetch() api,
  25. // please see dojo/data/api/Read.fetch().
  26. throw new Error('Unimplemented API: dojo.data.api.Request.abort');
  27. }
  28. });
  29. });