Side navigation
#3591 closed enhancement (duplicate)
Opened November 10, 2008 08:35PM UTC
Closed November 11, 2009 08:36PM UTC
Patch: xhr object isn't returned in $.ajax() success callback
Reported by: | alan.castro | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | 1.4 |
Component: | ajax | Version: | 1.3.2 |
Keywords: | Cc: | alan.castro | |
Blocked by: | Blocking: |
Description
xhr object is useful to get the headers values.
Attachments (1)
Change History (5)
Changed November 11, 2008 12:38PM UTC by comment:1
cc: | → alan.castro |
---|
Changed February 22, 2009 07:57AM UTC by comment:2
I would also really like to see this change. What i'm after is the ability to check my xhr for specific headers before proceeding with inserting the data returned into the dom. The success callback is really the only place for this that I can tell.
Using the complete() callback is no good for that as it doesn't take the data as a parameter. It's likely I can extract this from the xhr object itself however this seems potentially fragile. It would be much nicer to just have it passed into the success callback directly.
Changed July 24, 2009 02:40PM UTC by comment:3
I'd also appreciate this. Like you say, Ariel, the complete and success callbacks have different purposes, and it's in the success callback that i'd like access to the xhr. :)
Changed September 09, 2009 04:09PM UTC by comment:4
I also ask why?
the error callback contains the XHR object in its signature while the success callback doesn't have it!.
I think you are meant to use the complete callback for that.
It does receive the xhr, they have different purposes.