Merge pull request #3343 from Nemo157/rest-wrap-fi

Rest wrap fixes
This commit is contained in:
Masahiro Wakame
2014-12-18 13:51:25 +09:00
2 changed files with 2 additions and 2 deletions

View File

@@ -15,7 +15,7 @@ client({ path: '/data.json' }).then(function(response) {
console.log('response: ', response);
});
client = rest.wrap(mime).wrap(errorCode, { code: 500 });
client = rest.wrap(mime, { mime: 'application/json' }).wrap(errorCode, { code: 500 });
client({ path: '/data.json' }).then(
function(response) {
console.log('response: ', response);

2
rest/rest.d.ts vendored
View File

@@ -14,7 +14,7 @@ declare module "rest" {
function rest(request: rest.Request): rest.ResponsePromise;
module rest {
export function wrap(interceptor: Interceptor): Client;
export function wrap(interceptor: Interceptor, config?: any): Client;
export interface Request {
method?: string;