Home > Class Reference > ENSLIB namespace > %CSP.Request

%CSP.Request

class %CSP.Request extends %Library.RegisteredObject

The %CSP.Request class encapsulates an incoming URL and its parameters.

When a csp request is received, the CSP Server creates an instance of the %CSP.Request class. This is accessible via the %request variable.

Property Inventory (Including Private)

Method Inventory (Including Private)

Properties (Including Private)

property Application as %String;
The section of the Url that has been matched against a CSP application name.
Property methods: ApplicationDisplayToLogical(), ApplicationGet(), ApplicationIsValid(), ApplicationLogicalToDisplay(), ApplicationLogicalToOdbc(), ApplicationNormalize(), ApplicationSet()
property CSPGatewayRequest as %Boolean [ InitialExpression = 0 ];
True if the request came the CSP Gateway, and false if it was from the command line or the built in web server.
Property methods: CSPGatewayRequestDisplayToLogical(), CSPGatewayRequestGet(), CSPGatewayRequestIsValid(), CSPGatewayRequestLogicalToDisplay(), CSPGatewayRequestNormalize(), CSPGatewayRequestSet()
property CgiEnvs as %String [ MultiDimensional ];
An array of strings containing any environment values associated with this request. The format of this array is:
  • request.CgiEnvs(<NAME>)=<VALUE>
Where <NAME> is the name of the Cgi environment variable and <VALUE> is the value of this environment variable.

It is suggested that you use the accessor methods rather than set/get the value of this multidimentional property directly.
Property methods: CgiEnvsDisplayToLogical(), CgiEnvsGet(), CgiEnvsIsValid(), CgiEnvsLogicalToDisplay(), CgiEnvsLogicalToOdbc(), CgiEnvsNormalize(), CgiEnvsSet()
property CharSet as %String;
Character set this request was send in, if not specified in the HTTP headers it defaults to the character set of the page it is being submitted to.
Property methods: CharSetDisplayToLogical(), CharSetGet(), CharSetIsValid(), CharSetLogicalToDisplay(), CharSetLogicalToOdbc(), CharSetNormalize(), CharSetSet()
property Content as %CSP.Stream;
A %CSP.Stream containing the content submitted with this request.
Property methods: ContentGet(), ContentGetSwizzled(), ContentIsValid(), ContentNewObject(), ContentSet(), ContentTypeDisplayToLogical(), ContentTypeGet(), ContentTypeIsValid(), ContentTypeLogicalToDisplay(), ContentTypeLogicalToOdbc(), ContentTypeNormalize(), ContentTypeSet()
property ContentType as %String;
A string indicating the MIME Content-Type of the request.
Property methods: ContentTypeDisplayToLogical(), ContentTypeGet(), ContentTypeIsValid(), ContentTypeLogicalToDisplay(), ContentTypeLogicalToOdbc(), ContentTypeNormalize(), ContentTypeSet()
property Cookies as %String [ MultiDimensional ];
An array of strings containing any cookie values associated with this request. The format of this array is:
  • request.Cookies(<NAME>,<INDEX>)=<VALUE>
Where <NAME> is the name of the cookie, <INDEX> is an index number starting at 1 as you may have multiple cookies with the same name so subsequent ones will be added with a higher index number. <VALUE> is the value of this cookie.

It is suggested that you use the accessor methods rather than set/get the value of this multidimentional property directly.
Property methods: CookiesDisplayToLogical(), CookiesGet(), CookiesIsValid(), CookiesLogicalToDisplay(), CookiesLogicalToOdbc(), CookiesNormalize(), CookiesSet()
property Data as %String [ MultiDimensional ];
An array of strings containing any parameter name/value pairs associated with this request. The format of this array is:
  • %request.Data(<NAME>,<INDEX>)=<VALUE>
  • %request.Data(<NAME>,<INDEX>,"encrypt")=<Encrypted state>
  • %request.Data(<NAME>,<INDEX>,"O")=<Order number item was added>
Where <NAME> is the name of the parameter, <INDEX> is an index number starting at 1 as you may have multiple parameters with the same name so subsequent ones will be added with a higher index number. <VALUE> is the value of this parameter. <Encrypted state> is 1 if the value of this parameter was encrpyted and 0 otherwise.
Note that it is faster to access this multidimensional property directly rather than going through the accessor methods. For example:
  ; Set the index number one 'Name' to 'Value'
  Set %request.Data("Name",1)="Value"
  ; Output the value of parameter 'Name' for index number one (the default)
  Write %request.Data("Name",1)
  ; Insert a new value for parameter 'Name' to 'Value'
  Set %request.Data("Name",$Order(%request.Data("Name",""),-1)+1)="Value"
  ; Test if parameter 'Name' at index 2 is encrypted
  If $Data(%request.Data("Name",2,"encrypt"))
  
Property methods: DataDisplayToLogical(), DataGet(), DataIsValid(), DataLogicalToDisplay(), DataLogicalToOdbc(), DataNormalize(), DataSet()
property GatewayApplication as %String;
The section of the Url that the CSP Gateway on the web server matched against to determine which Caché server to send the request to. If the Url was '/csp/samples/menu.csp' and the CSP Gateway is setup to match all requests to '/csp' then this parameter would be '/csp'.
Property methods: GatewayApplicationDisplayToLogical(), GatewayApplicationGet(), GatewayApplicationIsValid(), GatewayApplicationLogicalToDisplay(), GatewayApplicationLogicalToOdbc(), GatewayApplicationNormalize(), GatewayApplicationSet()
property GatewayBuild as %String;
The internal build version of the CSP Gateway talking to the server
Property methods: GatewayBuildDisplayToLogical(), GatewayBuildGet(), GatewayBuildIsValid(), GatewayBuildLogicalToDisplay(), GatewayBuildLogicalToOdbc(), GatewayBuildNormalize(), GatewayBuildSet()
property GatewayConnectionName as %String;
The name of the connection in the CSP Gateway that this request was sent to.
Property methods: GatewayConnectionNameDisplayToLogical(), GatewayConnectionNameGet(), GatewayConnectionNameIsValid(), GatewayConnectionNameLogicalToDisplay(), GatewayConnectionNameLogicalToOdbc(), GatewayConnectionNameNormalize(), GatewayConnectionNameSet()
property GatewayInstanceName as %String;
The instance host name of the Gateway that is communicating with this process
Property methods: GatewayInstanceNameDisplayToLogical(), GatewayInstanceNameGet(), GatewayInstanceNameIsValid(), GatewayInstanceNameLogicalToDisplay(), GatewayInstanceNameLogicalToOdbc(), GatewayInstanceNameNormalize(), GatewayInstanceNameSet()
property GatewayNewId as %Boolean [ InitialExpression = 0 ];
True if the sessionId is newly assigned by the Gateway, and false if it is provided by the browser
Property methods: GatewayNewIdDisplayToLogical(), GatewayNewIdGet(), GatewayNewIdIsValid(), GatewayNewIdLogicalToDisplay(), GatewayNewIdNormalize(), GatewayNewIdSet()
property GatewaySessionCookie as %String;
The session cookie that the Gateway picked as the sessionId
Property methods: GatewaySessionCookieDisplayToLogical(), GatewaySessionCookieGet(), GatewaySessionCookieIsValid(), GatewaySessionCookieLogicalToDisplay(), GatewaySessionCookieLogicalToOdbc(), GatewaySessionCookieNormalize(), GatewaySessionCookieSet()
property GatewayTimeout as %Integer [ InitialExpression = 60 ];