Skip to main content

Bug Tracker

Side navigation

#9565 closed enhancement (worksforme)

Opened June 11, 2011 11:22PM UTC

Closed June 12, 2011 02:23AM UTC

Last modified June 12, 2011 10:13AM UTC

Add ajax request type to the xhr object

Reported by: anonymous Owned by:
Priority: low Milestone: 1.next
Component: ajax Version: 1.6.1
Keywords: Cc:
Blocked by: Blocking:
Description

I have a global ajax event handler in my app and I was very surprised when I couldn't find out the request type (get/post/delete and so) from the xhr object which is passed to the callback.

I have searched the documentation, but I couldn't find good solution. And I think that adding such property to the xhr object itself won't be very hard

Attachments (0)
Change History (4)

Changed June 12, 2011 01:34AM UTC by rwaldron comment:1

component: unfiledajax
description: I have a global ajax event handler in my app and I was very surprised when I could find out the request type (get/post/delete and so) from the xhr object which is passed to the callback. \ \ I have searched the documentation, but I couldn't find good solution. And I think that adding such property to the xhr object itself won't be very hardI have a global ajax event handler in my app and I was very surprised when I couldn't find out the request type (get/post/delete and so) from the xhr object which is passed to the callback. \ \ I have searched the documentation, but I couldn't find good solution. And I think that adding such property to the xhr object itself won't be very hard

Changed June 12, 2011 02:23AM UTC by dmethvin comment:2

priority: undecidedlow
resolution: → worksforme
status: newclosed

By default, the this object of the ajax callbacks is $.ajaxSettings combined with the argument to $.ajax which would have the type passed into the method, if any. (The default type is GET.) I've updated the docs to clarify.

Changed June 12, 2011 02:24AM UTC by dmethvin comment:3

Changed June 12, 2011 10:13AM UTC by anonymous comment:4

10x I didn't know that :)