Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for post json body (fix #545) #557

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

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
Contributor

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

Successfully merging this pull request may close these issues.

2 participants