# jQuery post function

**URL:** <https://www.ruby-forum.com/t/jquery-post-function/155617>\
**Category:** Rails\
**Created:** [December 14, 2008, 7:14pm UTC](https://www.ruby-forum.com/t/jquery-post-function/155617 "2008-12-14T19:14:53Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![daz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/87869e/32.png) [@daz](https://www.ruby-forum.com/u/daz)\
**Post date:** [December 14, 2008, 7:14pm UTC](https://www.ruby-forum.com/t/jquery-post-function/155617/1 "2008-12-14T19:14:53Z")

</div>

If you use jQuery to post data, what is the accepted best practice for  
passing parameters - by putting a query string in the url, or passing  
them through the data argument of the function?

e.g.

$.post(/tasks/3?completed=true;,{ \_method: “PUT” },null, “script”)

OR

$.post(/tasks/3;,{ \_method: “PUT”,completed: true },null, “script”)

cheers,

DAZ
