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

document the wire type of parameter of data of function jQuery.post() #1115

Open
bronze1man opened this issue Nov 7, 2018 · 0 comments
Open

Comments

@bronze1man
Copy link

What is the wire type of parameter of data of jQuery.post()?
If I pass in an object like {"n":"bar"} , what I will get in the ajax http post body? a json like '{"n":"bar"}' or a url-encoding query like "n=bar" ?
If I pass in a string like "hello world", what I will get in the ajax http post body? Direct put in http post body?

The document at https://api.jquery.com/jquery.post/ do not tell me anything about it.

notice

  • I can write a web server and use the jquery.post() to try and guess what will happen, but I want know it before I write my web server logic.
  • Parameter dataType is The type of data expected from the server. , not the request data type.
  • I have found some details in json $.ajax post messed up post-content when ?? in content jquery#2594 (comment) . But it is hard to find in google and it is not all the problem.
@timmywil timmywil transferred this issue from jquery/jquery Nov 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant