We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
1.1.3
ODataService Ajax request interceptor (e.g. for adding Authorization http header) as an option in ODataService initialization Implementation:
export interface IAjaxInterceptor { intercept(options: AjaxOptions): AjaxOptions; } export interface IODataServiceOptions<TResponse> { ... ajaxInterceptor?: IAjaxInterceptor; } ... if (this.options.ajaxInterceptor) { o = this.options.ajaxInterceptor.intercept(o); } return this.options.ajaxProvider.ajax(o) ...
Usage:
const svc = new ODataService({ ajaxProvider: provider, ajaxInterceptor: { intercept: (options) => { //options.headers = Object.assign({}, options.headers, { Authorization: "67890" } ); // copying is bad if (!options.headers) options.headers = {}; options.headers['Authorization'] = "67890"; return options; } } });
There is no single point of interception for such task. The options currently available:
PS. Already done in my repository
The text was updated successfully, but these errors were encountered:
No branches or pull requests
jinqu-odata version
1.1.3
Proposed behavior
ODataService Ajax request interceptor (e.g. for adding Authorization http header) as an option in ODataService initialization
Implementation:
Usage:
Actual behavior
There is no single point of interception for such task. The options currently available:
PS. Already done in my repository
The text was updated successfully, but these errors were encountered: