Merge pull request #14503 from mksarge/master

[restify] Add field 'ca' in ServerOptions
This commit is contained in:
Zhengbo Li
2017-02-17 13:47:11 -08:00
committed by GitHub
2 changed files with 4 additions and 2 deletions

1
restify/index.d.ts vendored
View File

@@ -449,6 +449,7 @@ interface Server extends http.Server {
}
interface ServerOptions {
ca?: string;
certificate?: string;
key?: string;
formatters?: Object;

View File

@@ -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');