Add support for responses

This commit is contained in:
2021-03-07 09:58:21 -06:00
parent e298319bf5
commit 94add3d471
4 changed files with 207 additions and 7 deletions

View File

@@ -38,10 +38,9 @@ export class HTTPServer extends Unit {
public get handler() {
return (request: IncomingMessage, response: ServerResponse) => {
const extolloReq = new Request(request)
console.log(extolloReq)
console.log(extolloReq.protocol)
response.end('Hi, from Extollo!');
const extolloReq = new Request(request, response)
extolloReq.cookies.set('testing123', {foo: 'bar', bob: 123})
extolloReq.response.send('Hi, from Extollo!!')
}
}