javascript - jQuery Ajax PUT not firing -


the following ajax works advertised in chrome. http put used trigger insertion of object restful api.

        $.ajax({             type: "put",             url: "/ajax/rest/team/create/",             datatype: "json",             processdata: false,             data: json.stringify(teamobject),             success: function (response) {                 teamobject = response.object;             }         });  

i note jquery api docs helpfully tell me put , delete may work not guaranteed in browsers. such problem.

how restful api supposed implemented on client side problem this?

edit: firebug tells me ff indeed issuing put, unknown reason it's dying before getting server. repeat, works fine in chrome.

edit: fiddler doesn't see ff attempt @ all. :(

i got following work.

var payload = json.stringify(teamobject) synchttp('/ajax/rest/team/create/', 'put', payload);  function synchttp(url,method,payload) {     var client = new xmlhttprequest();      client.open(method, url, false);     client.setrequestheader("content-type", "text/plain");     client.send(payload); } 

i'd rather use jquery roll own tho. :| if ever figures out, add answer , if works i'll accept it.

thanks.


Comments

Popular posts from this blog

c++ - Function signature as a function template parameter -

algorithm - What are some ways to combine a number of (potentially incompatible) sorted sub-sets of a total set into a (partial) ordering of the total set? -

How to call a javascript function after the page loads with a chrome extension? -