ajax - easyxdm Put giving a 400 Bad request Error -
i'm facing problem put request when using easyxdm. other operations such post, delete works fine. placing data in query string. tried following post: easyxdm put places data in query string
after changing code sending data in request payload data not formed, leading bad request.
putjson = function (url, request, success_callback, error_callback, custom_headers) { if (typeof (custom_headers) == "undefined") { custom_headers = {}; }; //custom_headers.accept = "application/json"; this.rpcsocket.request({ url: url, method: "put", datatype: 'json', headers: { "content-type": "application/json"}, data: request }, function (response) { success_callback(response); }, function (error_response) { if (_.isundefined(error_callback) || !_.isfunction(error_callback)) { ajaxerror.call(error_response); } else { error_callback(error_response) }; }); }
Comments
Post a Comment