Merge pull request #2689 from domesticmouse/patch-4

Adding promises to GAPI
This commit is contained in:
Masahiro Wakame
2014-08-20 13:42:34 +09:00
+17
View File
@@ -141,6 +141,23 @@ declare module gapi.client {
statusText: string;
}
) => any):void;
/**
* HttpRequest supports promises.
*/
then(success:(response:{
result:T;
body:string;
headers?: any[];
status?: number;
statusText?: string
})=>void,
failure:(response:{
result:T;
body:string;
headers?: any[];
status?: number;
statusText?: string
})=>void): void;
}
/**
* Represents an HTTP Batch operation. Individual HTTP requests are added with the add method and the batch is executed using execute.