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
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
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')?