Conversation

zhangciwu

Add support for post json body

Not enough time for adding unit test, @kevindb if you have time, you may add a few

@kevindb

This PR needs unit tests to test the added functionality before it can be accepted.

@zhangciwu

Added one unit test, for data check.
(Fix a bug during this, UT is so important)

But multi input with same name now will only preserve the last one's value
(Json can not have two same key)
Maybe add a option later to handle it to a array


if (options.data) {
var optionsData = $.isFunction(options.data) ? options.data(a) : options.data;
optionsData = $.isFunction(options.data) ? options.data(a) : options.data;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did you remove the var when declaring optionsData?

Sign up for free to join this conversation on . Already have an account? Sign in to comment
None yet

Successfully merging this pull request may close these issues.