mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-05-13 21:06:14 +08:00
Add missing headers() function to restangular's IResponse
This commit is contained in:
@@ -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
restangular/restangular.d.ts
vendored
1
restangular/restangular.d.ts
vendored
@@ -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