Injecting a HTTP request into a running server (unified socket api)

14 views
Skip to first unread message

Prajwal Manjunath

unread,
Jun 23, 2014, 2:09:31 AM6/23/14
to nod...@googlegroups.com
Hello,

What is the best way to "fake" the *request* event of http module? My use case is to make a socket.io API that looks like a http verb api (similar to SailsJS) so generic routers can be used for sockets (like koa-route).

The Sails implementation fakes a request using a mocking module. I find it quite inelegant however, and was wondering if there is any significant performance penalty to do it instead with http.request('localhost')?

Thanks!
Reply all
Reply to author
Forward
0 new messages