Skip to main content

Bug Tracker

Side navigation

#2639 closed enhancement (wontfix)

Opened April 02, 2008 06:01PM UTC

Closed May 15, 2008 08:32PM UTC

Make XMLHttpRequest or headersAvailable to "success" callback of post

Reported by: Shaft0rz Owned by:
Priority: major Milestone: 1.2.4
Component: ajax Version: 1.2.3
Keywords: post header Cc:
Blocked by: Blocking:
Description

I would like to be able to check the Response headers of a $.post() call in the success callback. In my case, the response might either be text, or json, and I'd like to vary my behavior based on the Content-Type. I believe I can work around it with the ajaxSuccess event, but I think a more direct solution would be helpful.

Attachments (1)
  • detect_content_type.diff (0.7 KB) - added by Shaft0rz April 02, 2008 06:43PM UTC.

    diff that implements auto content-type detection

Change History (2)

Changed April 02, 2008 06:44PM UTC by Shaft0rz comment:1

I've attached a patch that works-around my request, but taking the appropriate action in httpData based on the content-type (only if the user hasn't specified a content-type).

Changed May 15, 2008 08:32PM UTC by flesler comment:2

resolution: → wontfix
status: newclosed

Use the 'complete' callback, it does receive the XMLHttpRequest object.