Opened 14 years ago

Closed 8 years ago

#176 closed enhancement (wontfix)

Allow dojo.io.bind to specify successful HTTP codes

Reported by: david Owned by: alex
Priority: high Milestone: future
Component: IO Version: 0.1
Keywords: bind xmlhttprequest xhr Cc:
Blocked By: Blocking:

Description (last modified by dylan)

Something like:

dojo.io.bind({
   acceptCodes: [404, 500],
   url: "...",
   load: function() {
      alert("The server puked, but I'd like to call that a success");
   },
   error: function() {
      alert("The server did just fine. Isn't that a shame.");
   }
});

Change History (6)

comment:1 Changed 13 years ago by dylan

Component: GeneralIO
Milestone: 0.5
Owner: changed from anonymous to alex

comment:2 Changed 12 years ago by bill

Milestone: 0.91.1

comment:3 Changed 12 years ago by bill

When we do this will probably want to pass in a function to check for error, rather than an array of return codes.

comment:4 Changed 11 years ago by dylan

Milestone: 1.11.2

comment:5 Changed 11 years ago by dylan

Description: modified (diff)
Milestone: 1.2future

comment:6 Changed 8 years ago by Chris Mitchell

Resolution: wontfix
Status: newclosed
Note: See TracTickets for help on using tickets.