Advertisement
Guest User

Untitled

a guest
Apr 18th, 2014
48
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. app.get('/pdf/:id', function(req, res) {
  2.  
  3. GET http://localhost/pdf/123?option=456&clientId=789
  4.  
  5. req.query == { option: '456' }
  6. req.params == { id: '123' }
  7.  
  8. curl 'http://localhost/pdf/123?option=456&clientId=789'
  9.  
  10. app.get('/pdf/:id', function(req, res) {
  11. console.log(req.params);
  12. console.log(req.query);
  13.  
  14. res.end();
  15. });
  16.  
  17. [ id: '123' ]
  18. { option: '456', clientId: '789' }
  19. GET /pdf/123?option=456&clientId=789 200 1ms
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement