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

Popular posts from this blog

python - No exponential form of the z-axis in matplotlib-3D-plots -

php - Best Light server (Linux + Web server + Database) for Raspberry Pi -

c# - "Newtonsoft.Json.JsonSerializationException unable to find constructor to use for types" error when deserializing class -