$webinfo
Return or set information about the current HTTP request or response.
$webinfo("
Function")
{ =
Value}
Value =
$webinfo("
Function")
Example: vReturn=$webinfo("input")
Parameters
Parameter | Data Type | Description |
---|---|---|
Function | String | Keyword for a function that gets or sets specific information of an HTTP request or response. See $webinfo Functions . |
Value | String | Value associated with Function |
Return Values
Value | Error constant | Meaning |
---|---|---|
-31 | <UGENERR_LICENSE> | No license for requested action. Contact your Uniface representative. |
-250 | <UWEBERR_SKELETON> | Skeleton file not found or is incorrect. |
-251 | <UWEBERR_OUTFILE> | When
$web="" , the output file is not specified or is the same as the
skeleton file. |
-252 | <UWEBERR_IO> | Output file could not be written. |
-253 | <UWEBERR_IO_IMAGE> | Image file could not be written. |
-254 | <UWEBERR_ITERATION> | Nested iteration over the same entity. |
Use
Use in Dynamic and Static Server Page components.
Description
The $webinfo function provides information about requests from the browser to the server page, and it is used to prepare information sent to the browser. By specifying the relevant Function, you can get or set specific information in the request or response. These functions serve as the interface to the USYSHTTP component, which is responsible for communication between Uniface and the web server.
Keyword | Direction | Description |
---|---|---|
Data functions. For more information, see $webinfo: Data Topics. | ||
Input
|
IN | Data received from the browser as part of
an HTTP request for a static server page. It consists of an associative list that may include input parameters provided as a query string, and is used by webget to load data into the current component. |
PathInput
|
IN | Associative list containing input parameters from a semantic URL (as opposed to a query string). |
Data
|
INOUT | JSON-formatted data sent to and from the browser by webload and websave. (DSPs only). |
Output
|
OUT | Data returned to the web browser by webgen. (USPs only) |
DSP Functions |
||
Definitions
|
INOUT | Component definitions, such as properties, initial values and ValRep lists; filled by webdefinitions with the component definitions from the current component. |
JavaScript
|
OUT | JavaScript definitions. Populated by webdefinitions statement with the Uniface JavaScript definitions. (DSPs only) |
CSS
|
OUT | Cascading style sheet definitions. Populated by webdefinitions with Uniface CSS definitions. (DSPs only.) |
Layout
|
OUT | HTML layouts sent to the Web browser. Populated by the weblayout statement. (DSP only). |
Locale
|
OUT | Client-side locale used for locale-based formatting on the browser; for example en_US , fr_CA , nl_NL . For more information, see $webinfo("Locale") |
Cookie Functions. For more information, see $webinfo: Cookie Topics. | ||
CookiesIn
|
IN | Associative list of cookies present in the request |
CookiesOut
|
OUT | Associative list of multiple, named cookies to be set in the response. |
UserContext
|
OUT | Associative list specifying information for a single, unnamed cookie. |
HTTP Request and Header Functions. For more information, see $webinfo: HTTP Header and Request Functions. | ||
HttpRequestParams
|
IN | Associative list of request parameters present in the request URL; it can include the entity names and occurrence IDs that are used by websetocc to set the current occurrence for the current component. |
HttpRequestHeaders
|
IN | Incoming HTTP headers from the browser, excluding cookie headers |
HttpResponseHeaders
|
OUT | Returned HTTP headers, excluding cookie headers. |
State and Status Functions | ||
SessionCommands
|
OUT | Associative list of session commands and parameters. For more information, see $webinfo ("SessionCommands"). |
RequestContext
|
INOUT | Associative list of state information for the current HTTP request and response. For more information, see $webinfo ("RequestContext"). |
WebServerContext
|
IN | Associative list of server context properties. For more information, see $webinfo ("WebServerContext") . |
Status
|
OUT | Status code for the response. The default is 200, but it can be set to something else. It is placed in the first line of the response sent to the browser. |
StatusReason
|
OUT | Default value placed in the first line of the response when the status code is 200. |
Salt Functions. For more information, see $webinfo: Salt Topics. | ||
Salt
|
INOUT | Salt string used to generate and verify a hash using webget and webgen respectively. |
SaltIn
|
IN | Salt string used by webget to verify a hash. |
SaltOut
|
OUT | Salt string used by webgen to generate a hash. |
Version | Change |
---|---|
10.3.02.009 9.7.05.022 |
Added function: Locale |
9.7.04 G404 | Added functions: Salt, SaltIn, and SaltOut |
9.7.01 | Added functions: PathInput |
9.5.01 | Added functions: SessionCommands and
RequestContext |
9.4.01 | Added functions: CSS ,
Data , Definitions , Layout , and
JavaScript . |