Skip to content

Conversation

zhangciwu
Copy link

Add support for post json body

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

@kevindb
Copy link
Member

kevindb commented Mar 17, 2019

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

@zhangciwu
Copy link
Author

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
Member

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 GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants