| Issue 386: | Control $.ajax options when fetching feed (like type:POST) | |
| 9 people starred this issue and may be notified of changes. | Back to list |
It isn't a huge issue but it would be excellent if fullcalendar would support the option to use POST instead of GET for the events JSON feed request. ASP.NET MVC in particular defaults to disallowing JSON requests via HTTP GET for security concerns. I don't think that issue applies in my usage but if there aren't any downsides to using POST... Thanks, Cymen
Apr 19, 2010
Definitely a nice to have until browsers fix bugs like this one http://haacked.com/archive/2009/06/25/json-hijacking.aspx. Instead of using the property "ajaxType" however, I'd recommend "ajaxMethod" or "requestMethod" or even "jsonRequestMethod" to adhere to proper spec nomenclature.
Jun 14, 2010
i agree, it would be nice to have more control over the ajax request, and be able to pipe options into the underlying $.ajax. I'm hoping to have a more flexible set of options in at some point. will bump this up in priority and "accept" it if more people need it. thanks
Summary:
Control $.ajax options when fetching feed (like type:POST)
Jun 14, 2010
Issue 486 has been merged into this issue.
Jun 14, 2010
(No comment was entered for this change.)
Status:
Accepted
Aug 10, 2010
Related to this, I would like to see the ability to submit a form. We are using the calendar in a situation where the user can specify the timezone and categories of events and click "submit", which refreshes the calendar. As of now, it looks like we will have to use the events function to accomplish this, but that means converting our json into event objects, which is overhead. If we could just submit the form via Ajax and have fullCalendar tack on the start and end dates, we would not need to do that. I guess the underlying requirement is to be able to specify more parameters to be sent on the Ajax call to get the events.
Jan 18, 2011
I wondering can you now have more control over which kind of json request gets sent? Or is this till an outstanding issue?
Jan 19, 2011
>Or is this till an outstanding issue? This.
Jan 21, 2011
I would like to second/third/fouth (whatever number we're on now) this request. I have changed the code to be POST, but also to send other properties as a JSON object. It is good to have different feeds, but ability to pass other data is also important. eg, GetAllEvents for Category X between Y and Z... you can't have a different URL for each category.
Feb 6, 2011
Another useful ajax parameter to pass is whether it should be a sync/async call.
Feb 13, 2011
Issue 804 has been merged into this issue.
Mar 20, 2011
this is in 1.5 (just released)... http://blog.arshaw.com/1/post/2011/03/fullcalendar-15-released.html
Status:
Fixed
Aug 13, 2013
(No comment was entered for this change.)
Status:
Implemented
Aug 13, 2013
(No comment was entered for this change.)
Status:
Released
|
|
| ► Sign in to add a comment |
Easy to add: $.ajax({ url: src, dataType: 'json', data: params, cache: options.cacheParam || false, // don't let jquery prevent caching if cacheParam is being used success: reportEventsAndPop }); To: $.ajax({ type: options.ajaxType || 'GET', url: src, dataType: 'json', data: params, cache: options.cacheParam || false, // don't let jquery prevent caching if cacheParam is being used success: reportEventsAndPop }); Then in options setup, do: $(document).ready(function () { $('#calendar').fullCalendar({ ajaxType: 'POST', events: '/json/calendar', ...