c# - breeze - sending header to server doesnt work -
i trying send custom header server. dont see in request headers on server. tried using following:
var ajaximpl = breeze.config.getadapterinstance("ajax"); ajaximpl.defaultsettings = { headers: { // cors or other headers want specify. "x-test-header": "foo2" }, };
as as:
var ajaximpl = breeze.config.getadapterinstance("ajax"); ajaximpl.defaultsettings = { beforesend: function(jqxhr, settings) { // examine jqxhr or settings , customize headers accordingly. jqxhr.setrequestheader("x-test-before-send-header", "foo2"); } };
and tried using "ajax"as "dataservice" adapterinstance. have no idea why should not work...
Comments
Post a Comment