Skip to main content

Bug Tracker

Side navigation

#14148 closed bug (notabug)

Opened July 18, 2013 11:30AM UTC

Closed July 18, 2013 01:08PM UTC

Last modified July 19, 2013 12:48PM UTC

jQuery.post() - "%5Bobject%20Object%5D"

Reported by: m_lajos@hotmail.com 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.

Attachments (0)
Change History (4)

Changed July 18, 2013 11:37AM UTC by anonymous comment:1

Check this out with console, this is the bad example: http://jsfiddle.net/7r3T4/

This is the working version: http://jsfiddle.net/Zg5ZB/

Changed July 18, 2013 01:08PM UTC by dmethvin comment:2

resolution: → notabug
status: newclosed

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/

Changed July 19, 2013 12:39PM UTC by m_lajos@hotmail.com comment:3

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.

Changed July 19, 2013 12:48PM UTC by dmethvin comment:4

On the documentation page, it says what the arguments are. Just read the documentation and follow it.