Bug Tracker

Modify

Ticket #377 (closed enhancement: fixed)

Opened 7 years ago

Last modified 6 years ago

Auto-convert data in $.ajax if passed as object other then string

Reported by: joern Owned by:
Priority: major Milestone:
Component: ajax Version:
Keywords: Cc:
Blocking: Blocked by:

Description

There is hardly a case where the data passed to $.ajax is not converted via $.param. To prevent breaking existing code, the conversion could be applied when the data is not a string:

if (typeof data != 'string')
    data = jQuery.param(data)

With this addition, the conversion could be removed from both $.get and $.post.

Change History

comment:1 Changed 7 years ago by joern

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

Fixed in SVN.

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.