Skip to content

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

Open
@bronze1man

Description

@bronze1man

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions