Merge pull request #5927 from semberal/restangular-headers2

Add missing headers() function to restangular's IResponse
This commit is contained in:
Horiuchi_H
2015-09-25 16:27:58 +09:00
2 changed files with 3 additions and 1 deletions
+2 -1
View File
@@ -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');
+1
View File
@@ -43,6 +43,7 @@ declare module restangular {
interface IResponse {
status: number;
data: any;
headers(name: string): string;
config: {
method: string;
url: string;