mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-23 12:56:46 +08:00
Merge pull request #14503 from mksarge/master
[restify] Add field 'ca' in ServerOptions
This commit is contained in:
1
restify/index.d.ts
vendored
1
restify/index.d.ts
vendored
@@ -449,6 +449,7 @@ interface Server extends http.Server {
|
||||
}
|
||||
|
||||
interface ServerOptions {
|
||||
ca?: string;
|
||||
certificate?: string;
|
||||
key?: string;
|
||||
formatters?: Object;
|
||||
|
||||
@@ -18,6 +18,7 @@ var server = restify.createServer({
|
||||
});
|
||||
|
||||
server = restify.createServer({
|
||||
ca: "test",
|
||||
certificate: "test",
|
||||
key: "test",
|
||||
formatters: {},
|
||||
@@ -43,7 +44,7 @@ function send(req: restify.Request, res: restify.Response, next: restify.Next) {
|
||||
req.header('key') === 'val';
|
||||
req.trailer('key', 'val');
|
||||
req.trailer('key') === 'val';
|
||||
|
||||
|
||||
req.accepts('test') === true;
|
||||
req.accepts(['test']) === true;
|
||||
req.acceptsEncoding('test') === true;
|
||||
@@ -343,7 +344,7 @@ client2.get('/str/mcavage', function(err: any, req: any) {
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
|
||||
client.basicAuth('test', 'password');
|
||||
client2.basicAuth('test', 'password');
|
||||
|
||||
Reference in New Issue
Block a user