http#RequestListener TypeScript Examples

The following examples show how to use http#RequestListener. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: oauthClientServer.spec.ts    From cli with Apache License 2.0 6 votes vote down vote up
mockedCreateServer.mockImplementation((listener?: RequestListener) => {
  const req = {
    url: '/?code=TheCode&state=TheState',
  } as unknown as IncomingMessage;
  const res = {end: jest.fn()} as unknown as ServerResponse;
  process.nextTick(() => listener && listener(req, res));
  return {
    listen: mockedServerListen,
    close: mockedServerClose,
  } as unknown as Server;
Example #2
Source File: HTTPReceiver.d.ts    From flect-chime-sdk-demo with Apache License 2.0 5 votes vote down vote up
requestListener: RequestListener;