Previous Topic: Access MechanismNext Topic: Use HttpResponse Object


Access HttpRequest Object

ASP.NET Web Client provides a mechanism for accessing the HttpRequest object.

Follow these steps:

  1. Design an External Action Block (EAB).
  2. Use the EAB in the Pstep/Action Block where access to the requested information is required.
  3. Design the views and attributes that will hold the request information.
  4. Generate the EAB.
  5. Add the following in the EAB method where user code is expected:

    // User-written code should be inserted here

    HttpRequest req = (HttpRequest)IefRuntimeParm2.GetRequest();
    
  6. Query the required header such as:
    String userName = req.LogonUserIdentity.Name;
    
  7. Set system attributes such as:
    Globdata.GetStateData().SetUserId(userName);
    
  8. Set attributes in views such as:
    WOa.EUseridIefSuppliedCommand = userName;
    
  9. 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.
  10. Compile the application.