#14148 closed bug (notabug)
jQuery.post() - "%5Bobject%20Object%5D"
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | undecided | Milestone: | None |
Component: | unfiled | Version: | 1.10.2 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
The jquery post method can't create the URL, all URLs are set to %5Bobject%20Object%5D
.
If I change my code to $.ajax({method:"post"})
, then it works fine.
Change History (4)
comment:1 Changed 10 years ago by
comment:2 Changed 10 years ago by
Resolution: | → notabug |
---|---|
Status: | new → closed |
Indeed, that is a bad example. Don't pass an object to $.post()
since it expects a string that represents a URL. http://api.jquery.com/jQuery.post/
comment:3 Changed 10 years ago by
On the documentation page, you can read this: "This is a shorthand Ajax function, which is equivalent to" and a code below.
So if it is a shorthand code, it is expected to work the same as the jQuery.ajax with the same functionality.
Can you update the post method in the future to work like jQuery.ajax and to be fully compatible? That would be really nice.
comment:4 Changed 10 years ago by
On the documentation page, it says what the arguments are. Just read the documentation and follow it.
Check this out with console, this is the bad example: http://jsfiddle.net/7r3T4/
This is the working version: http://jsfiddle.net/Zg5ZB/