mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-10-12 12:10:48 +08:00
Add missing headers() function to restangular's IResponse
This commit is contained in:
1 parent
273a567b0a
commit
f38b15bc38
2 files changed
+3
-1
No files matched your search
@@ -92,7 +92,8 @@ myApp.controller('TestCtrl', (
|
||||
Restangular.setMethodOverriders(["put", "patch"]);
|
||||
|
||||
Restangular.setErrorInterceptor(function (response) {
|
||||
console.error('' + response.status + ' ' + response.data);
|
||||
let location: string = response.headers('Location');
|
||||
console.error('' + response.status + ' ' + response.data + ' ' + location);
|
||||
});
|
||||
|
||||
Restangular.setRequestSuffix('.json');
|
||||
|
||||
Vendored
+1
@@ -43,6 +43,7 @@ declare module restangular {
|
||||
interface IResponse {
|
||||
status: number;
|
||||
data: any;
|
||||
headers(name: string): string;
|
||||
config: {
|
||||
method: string;
|
||||
url: string;
|
||||
|
||||
Reference in new issue
Block a user