diff --git a/rest/rest-tests.ts b/rest/rest-tests.ts index 4ffe17d21d..b19416c119 100644 --- a/rest/rest-tests.ts +++ b/rest/rest-tests.ts @@ -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); diff --git a/rest/rest.d.ts b/rest/rest.d.ts index 34ffc3bf21..3bec656c33 100644 --- a/rest/rest.d.ts +++ b/rest/rest.d.ts @@ -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;