Ticket #6477 (closed enhancement: worksforme)
Add processData option to JQuery post
| Reported by: | aagrawal | Owned by: | |
|---|---|---|---|
| Priority: | low | Milestone: | |
| Component: | ajax | Version: | 1.4.2 |
| Keywords: | post,processData,request-body,ajaxrewrite | Cc: | |
| Blocking: | Blocked by: |
Description
It's common for web services to expect data to be POSTed in the request body and not as URL parameters. This cannot be done via $.post right now, so you have to resort to using $.ajax with type 'POST'.
This option should be added to $.post
Change History
comment:2 Changed 3 years ago by rwaldron
- Keywords post processData request-body added
- Priority set to low
- Status changed from new to open
- Milestone 1.4.3 deleted
See: http://api.jquery.com/jquery.ajax/ Find: processData
This might be a useful feature to extend to the $.post() shorthand
comment:3 Changed 2 years ago by rwaldron
- Keywords post,processData,request-body,ajaxrewrite added; post processData request-body removed
comment:4 Changed 2 years ago by jaubourg
Maybe there's something I don't get but there is no correlation between appending data to the url and processData. ProcessData only indicates the data needs to be url-encoded IF and WHEN it is not a string. If you pass a string to $.post() as your data parameter then it WILL be sent in the request body. Are we sure we're not dealing with a request that cannot be dealt with using a POST and hence end up being dealed with as a GET (cross-domain jsonp & script notably).
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.
