Files
DefinitelyTyped/types/restify-cookies/restify-cookies-tests.ts
Viktor Isaev cfbaa7d518 Updated typings for "restify-cookies". (#20548)
* Added typings for "require-dir".

* Fixed dtslint errors.

* Fixed By field.

* Added typings for "restify-cookies".

* Added "cookies" field to Request interface.
2017-10-16 13:46:17 -07:00

9 lines
253 B
TypeScript

import { Request, Response, Server } from 'restify';
import 'restify-cookies';
function test(server: Server) {
server.get('/api/test', (req: Request, res: Response) => {
res.setCookie('myCookie', 'test' + req.cookies.foo, { path: '/' });
});
}