Title: How to access the GET parameters against multiple requests ”in Express?
Tags: node.js;express;query-string
Question: I know how to access request a parameter in node.js with express, I can do it with
req.param('paramater')
req.query['paramater']
but I have stuck in a situation seen the docs but it is silent.
I want to have two requests at the same page, but problem is one request override the other, Please suggest me how to get parameters for multiple requests?
Comment: Could you explain the problem a bit clearly? You have to make two request at the same endpoint with different parameters?

Comment: Ok got it. The problem is likely that you send the two request at the same time concurrenty, not one after the other. In this way the second response is overrided from the first response. You can fix this problem sending the second request **only after** the first request has been sent back, in the callback of the first one.

Comment: firstRequest(..., function(err, res) {//populate first banner; secondRequest(..., function(err, res){//populate second banner}) });

Comment: yes if you go to http://qa.qscourses.co.uk/ at the bottom there are two different ads from different affiliates but whole link is duplicated on 2nd ad. One ad is override the info to other ad.

Comment: can you elaborate it "in the callback of the first one"



{'source': 'StackExchangeDataset', 'subset': 'stackoverflow.com', 'metadata': {'AnswerCount': 0, 'CommentCount': 5, 'ContentLicense': 'CC BY-SA 3.0', 'CreationDate': '2016:00:04/25/16', 'FavoriteCount': None, 'PostTypeId': 1, 'Tags': '<node.js><express><query-string>', 'Title': 'How to access the GET parameters against multiple requests ”in Express?', 'ViewCount': 127, 'id': 36836087, 'user_AboutMe': '<p>contact me through <a href="https://www.linkedin.com/in/shahbazkhan252" rel="nofollow noreferrer">linkedin</a> or <a href="https://www.facebook.com/ShahbazKhaan" rel="nofollow noreferrer">facebook</a> or ping me on shahbaz__ on skype</p>\n', 'user_AccountId': 2101754.0, 'user_DisplayName': 'Shahbaz', 'user_Reputation': 3343.0, 'user_Views': 346.0, 'user_id': 1869193.0}}