h2non / rocky

Full-featured, middleware-oriented, programmatic HTTP and WebSocket proxy for node.js (deprecated)
MIT License
371 stars 24 forks source link

Request reply shortcut method #40

Closed h2non closed 9 years ago

h2non commented 9 years ago

Sometimes we don't wanna forward the request

proxy
  .get('/users/admin')
  .reply(401, { 'Content-Type': 'application/json' }, { message: 'Forbidden' })
h2non commented 9 years ago

Done!