Bug Tracker

Opened 6 years ago

Closed 6 years ago

#13690 closed bug (invalid)

getJSON work differently than get and post

Reported by: anonymous Owned by: anonymous
Priority: undecided Milestone: None
Component: unfiled Version: 1.9.1
Keywords: Cc:
Blocked by: Blocking:

Description

Hi,

I work an app that use getJSON for get call and when I try to post data with $.post, there is a strange behavior. All my getJSON pass the Access-Control check but not the post. And no cookie is added on the $.post request but it's working on the getJSON.

I don't know if it's a bug, but at least I expect getJSON was a shortcut to $.ajax({

type:"get", url:"http://...", data:{}, datatype:'jsonp'

})

but this is not working when getJSON works.

Change History (2)

comment:1 Changed 6 years ago by m_gol

Owner: set to anonymous
Status: newpending

According to docs, jQuery.getJSON is equivalent to:

$.ajax({
  dataType: "json",
  url: url,
  data: data,
  success: success
});

dataType is json, not jsonp.

If you still think it's a bug, please provide a more concrete test case, your description is too general.

comment:2 Changed 6 years ago by trac-o-bot

Resolution: invalid
Status: pendingclosed

Because we get so many tickets, we often need to return them to the initial reporter for more information. If that person does not reply within 14 days, the ticket will automatically be closed, and that has happened in this case. If you still are interested in pursuing this issue, feel free to add a comment with the requested information and we will be happy to reopen the ticket if it is still valid. Thanks!

Note: See TracTickets for help on using tickets.