Questions tagged [request-object]

11 questions
26
votes
2 answers

How to parse variables in querystring using Express?

I have a request being sent to the server: "/stuff?a=a&b=b&c=c" Using express, how do I get these values? I have tried the following... app.get( "/stuff?:a&:b&:c", function( req, res ){}); ...however it does not seem to recognize the route. Thanks…
user1031947
  • 6,294
  • 16
  • 55
  • 88
24
votes
7 answers

Using request.setAttribute in a JSP page

Is it possible to use request.setAttribute on a JSP page and then on HTML Submit get the same request attribute in the Servlet?
ria
  • 7,904
  • 11
  • 39
  • 46
7
votes
2 answers

how to convert ipv6 address to ipv4 address in nodejs expressjs?

Request object of NODEJS provides this method req.connection.remoteAddres to get the client's IP Address, but it gives the address in IPV6 format,how do I convert it into IPV4 format which is more readable ?
5
votes
1 answer

How to modify the request object in Next.js middleware file?

How can I modify the request object in Next.js middleware file? I have seen this question but it does not answer my question. I have a middleware file that looks like below: // middleware.js export function middleware(request: NextRequest) { …
YulePale
  • 6,688
  • 16
  • 46
  • 95
2
votes
2 answers

How to programmatically distinguish element/control types from ASP.NET Request.Form key/value collection?

I have a simple ASP.NET web form as below:
Jeff
  • 13,079
  • 23
  • 71
  • 102
1
vote
1 answer

Ruby on Rails request object visibility/scope

I'm trying to understand the piece of Rails code below, and I'm not getting how the request object, with the header's attributes, is visible inside a method defined in a module that is required by the ApplicationController. The relevant code: in…
1
vote
1 answer

PHP how to pass `http request` object from one PHP file to another PHP file

usually when i want to redirect from one php page to another php page of same project i'm using header("location:somepage.php"); This will cause more calls between client and server. What i want to do is instead of sending redirect header, i want…
Ravi MCA
  • 2,491
  • 4
  • 20
  • 30
0
votes
1 answer

Symfony Request Object - FILES - Upload error constants

I've been following an article by Fabien Potencier about building your own framework from Symfony Components. $request = \Symfony\Component\HttpFoundation\Request::createFromGlobals(); I thought that the Request object could be used as a…
Andrew Berridge
  • 451
  • 5
  • 15
0
votes
1 answer

Pass parameter from java class to jsp using ActionRequest Actionresponse

I have a function say : public void display(ActionRequest areq, ActionResponse ares) throws Exception,PortletException,IOException { String name= areq.getParameter("name"); String add= areq.getParameter("add"); String phone=…
Seeya K
  • 1,221
  • 6
  • 27
  • 43
0
votes
0 answers

How to create a Request Object in Ajax for Only modern browsers

I want to make a javascript function to create a Request Object in Ajax. I want it to work for modern browsers only, and the question is: do I really need to difference between two possibilities? function createRequestObject(){ var reqObj; var…
Kenedy
  • 229
  • 4
  • 13