[restify] add patch function definition

This commit is contained in:
Mickael Burguet
2016-07-25 16:31:23 -04:00
parent c42b2ba16c
commit f92b6d38df
2 changed files with 3 additions and 0 deletions

View File

@@ -312,6 +312,7 @@ client = restify.createStringClient({
client.head('test', function(err: any, req: restify.Request, res: restify.Response) { });
client.put('path', {}, function(err: any, req: restify.Request, res: restify.Response, obj: any) { });
client.patch('path', {}, function(err: any, req: restify.Request, res: restify.Response, obj: any) { });
client.del('path', function(err: any, req: restify.Request, res: restify.Response) { });
client.post('/foo', { hello: 'world' }, function(err: any, req: restify.Request, res: restify.Response, obj: any) {

View File

@@ -473,6 +473,7 @@ declare module "restify" {
head: (path: string, callback?: (err: any, req: Request, res: Response) => any) => any;
post: (path: string, object: any, callback?: (err: any, req: Request, res: Response, obj: any) => any) => any;
put: (path: string, object: any, callback?: (err: any, req: Request, res: Response, obj: any) => any) => any;
patch: (path: string, object: any, callback?: (err: any, req: Request, res: Response, obj: any) => any) => any;
del: (path: string, callback?: (err: any, req: Request, res: Response) => any) => any;
basicAuth: (username: string, password: string) => any;
}
@@ -482,6 +483,7 @@ declare module "restify" {
head: (path?:any, callback?: Function) => any;
post: (opts?: any, callback?: Function) => any;
put: (opts?: any, callback?: Function) => any;
patch: (opts?: any, callback?: Function) => any;
del: (opts?: any, callback?: Function) => any;
}