

HttpRequest and HttpResponse Object Access › Access Mechanism › Access HttpRequest Object
Access HttpRequest Object
ASP.NET Web Client provides a mechanism for accessing the HttpRequest object.
Follow these steps:
- Design an External Action Block (EAB).
- Use the EAB in the Pstep/Action Block where access to the requested information is required.
- Design the views and attributes that will hold the request information.
- Generate the EAB.
- Add the following in the EAB method where user code is expected:
// User-written code should be inserted here
HttpRequest req = (HttpRequest)IefRuntimeParm2.GetRequest();
- Query the required header such as:
String userName = req.LogonUserIdentity.Name;
- Set system attributes such as:
Globdata.GetStateData().SetUserId(userName);
- Set attributes in views such as:
WOa.EUseridIefSuppliedCommand = userName;
- Use the values set in the views in the application logic. Note that Gen global data (Globdata) is available here but CA strongly recommends that customers not use it, as it is subject to change.
- Compile the application.
Copyright © 2013 CA.
All rights reserved.
 
|
|