mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-06-28 14:20:12 +00:00
path can be string or a hash of options
As per http://restify.com/#client-api it states: > Note that all further documentation refers to the "short-hand" > form of methods like get/put/del which take a string path. You > can also pass in an object to any of those methods with extra > params (notably headers): So the path can be either a string or a hash of options.
This commit is contained in:
12
restify/restify.d.ts
vendored
12
restify/restify.d.ts
vendored
@@ -470,12 +470,12 @@ declare module "restify" {
|
||||
}
|
||||
|
||||
interface Client {
|
||||
get: (path: string, callback?: (err: any, req: Request, res: Response, obj: any) => any) => any;
|
||||
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;
|
||||
get: (opts: any, callback?: (err: any, req: Request, res: Response, obj: any) => any) => any;
|
||||
head: (opts: any, callback?: (err: any, req: Request, res: Response) => any) => any;
|
||||
post: (opts: any, object: any, callback?: (err: any, req: Request, res: Response, obj: any) => any) => any;
|
||||
put: (opts: any, object: any, callback?: (err: any, req: Request, res: Response, obj: any) => any) => any;
|
||||
patch: (opts: any, object: any, callback?: (err: any, req: Request, res: Response, obj: any) => any) => any;
|
||||
del: (opts: any, callback?: (err: any, req: Request, res: Response) => any) => any;
|
||||
basicAuth: (username: string, password: string) => any;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user