mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-05-15 01:32:56 +08:00
@@ -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
2
rest/rest.d.ts
vendored
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user