Side navigation
#14211 closed bug (notabug)
Opened August 01, 2013 05:59PM UTC
Closed August 01, 2013 06:53PM UTC
jQuery.get() and jQuery.post() do not support "url data dataType" signature
Reported by: | m4ttlunn | Owned by: | |
---|---|---|---|
Priority: | undecided | Milestone: | None |
Component: | unfiled | Version: | 1.10.2 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
With jQuery.get() and jQuery.post(), I cannot use the signature;
jQuery.get('/foo', { // data }, 'json');
... instead, I have to specify a success handler as well;
jQuery.get('/foo', { // data }, jQuery.noop, 'json');
This is because the code makes allowances for missing "data" param, but not for missing "success".
The documentation however, says that "success" is optional.
Attachments (0)
Change History (1)
Changed August 01, 2013 06:53PM UTC by comment:1
resolution: | → notabug |
---|---|
status: | new → closed |
You could use a
null
for the callback instead, or use$.getJSON
. We'll update the docs to make it clearer.https://github.com/jquery/api.jquery.com/issues/351