wcf - Ajax POST request to ODATA service throws Invalid HTTP status code 501 -
i have following code wish use inserting record entity of odata service. post request throws xmlhttprequest cannot load invalid http status code 501.
apparently request works fine. can suggest way find out problem ? wcf service has problem ?
var data = { application_id: 777 , user_id: 'test' }; var data = json.stringify(data); $.ajax({ type: 'post', contenttype: 'application/json; charset=utf-8', datatype: 'json', url: odataurl + 'application_admins', data: data, beforesend: function (xmlhttprequest) { xmlhttprequest.setrequestheader("accept", "application/json"); }, success: function (data, textstatus, xmlhttprequest) { account = data.d; }, error: function (xmlhttprequest, textstatus, errorthrown) { } });
Comments
Post a Comment