문제

I have DataGrid that connects to REST service. I need to pass some custom HTTP headers (Authorization and others) to fetch operation. How can I do that?

Data store is JsonRestStore.

도움이 되었습니까?

해결책

Better late than never... Here's a workaround; add this function at the beginning of the dojo.addOnLoad() method.

dojo.xhrGet = function(args){// Workaround for Dojo's lack of support for custom headers
   args.headers = {userId:'xyz', requestedBy:'abc', requestedFrom:'123'};
   return dojo.xhr("GET", args);
};
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top