Bug Tracker

Ticket #4372 (closed enhancement: worksforme)

Opened 6 years ago

Last modified 5 years ago

ajax call needs two data sections

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

Description

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

comment:1 Changed 5 years ago by dmethvin

  • Status changed from new to closed
  • Resolution set to worksforme

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.