httpConfig arg for setFullRequestInterceptor is undocumented
See original GitHub issueFrom the dox:
“It’s a function that receives the same as the requestInterceptor plus the headers and the query parameters (in that order).”
From the example in the “How to configure them globally” section:
RestangularProvider.setFullRequestInterceptor(function(element, operation, route, url, headers, params) {
delete element.name;
return {
element: element,
params: _.extend(params, {single: true}),
headers: headers
};
});
However, there’s a seventh argument to that function that must also be part of the returned object:
RestangularProvider.setFullRequestInterceptor(function(element, operation, route, url, headers, params, httpConfig) {
delete element.name;
return {
element: element,
params: _.extend(params, {single: true}),
headers: headers,
httpConfig: httpConfig
};
});
Issue Analytics
- State:
- Created 10 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
Restangular Sample, rewritten to work with nge2e
setFullRequestInterceptor = function(interceptor) { config. ... httpConfig] = undefined; return RestangularResource(this.config, $http, url, ...
Read more >https://softwarepublico.gov.br/gitlab/noosfero-the...
... context?: any): any; + + fromJson(json: string): any; + identity<T>(arg?: ... + // BrowserService + // TODO undocumented, so we need to...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
httpConfig is actually configuration object of Angular`s $http service, you can check it in the Angular documentation.
Great.
I’ll update documentation then.