Bug Tracker

Opened 14 years ago

Closed 13 years ago

#4372 closed enhancement (worksforme)

ajax call needs two data sections

Reported by: flxkid Owned by:
Priority: minor Milestone: 1.4
Component: ajax Version: 1.3.2
Keywords: Cc:
Blocked by: Blocking:


I have a need to make ajax calls where it would be useful to keep the key/value pair encoding for the querystring, but also allow for a body to be passed. For instance I do a put that requires username/password and then an XML body also. For all my other rest calls I just pass the key/value pairs and let the $.ajax call encode them to the querystring. But since this call also needs data I have to build the string myself onto the url, turn off data processing and pass the xml as the data. Why not just have two data parameters? One to build the querystring and one for any actual data to send.

Change History (1)

comment:1 Changed 13 years ago by dmethvin

Resolution: worksforme
Status: newclosed

The easiest way to do that would be to use .serialize() to create your url and pass the object to .ajax().

Note: See TracTickets for help on using tickets.