Parses the URL of a redirection response for URL encoded parameters. This modifier is commonly used to get state information generated at server side at run time, like session IDs. When the search parameter is not specified (set to NULL), the complete redirect URL is retrieved.
It is important to know that all parsing and verification functions must be specified before the Web API call for which the response data should be parsed/verified. You can specify multiple parse/verification functions before a Web API call. The order of the parse/verification functions is not relevant (Exception: WebParseDataBound and WebVerifyDataBound using the flag WEB_FLAG_SYNCHRON).
WebAPI.bdh
WebParseResponseRedirect( out sResult : string optional, in nMaxResultLen : number optional, in sSearchParam : string optional ): boolean;
true if the parsing modifier could be created successfully
false otherwise
Parameter | Description |
---|---|
sResult | String variable that receives the value of the named parameter or the redirect URL (optional). May be NULL if no return value is needed. |
nMaxResultLen | Maximum length of the string to return (optional). This value must be less than or equal to the size of the string variable sResult. |
sSearchParam | Name of the parameter for which to retrieve the associated value (optional). Passing a NULL value causes the complete URL to be stored in sResult. |
dcltrans transaction TWeb var sParam1 : string(1000); sSession : string(200); begin WebParseResponseRedirect(sParam1, STRING_COMPLETE, "Param1"); WebParseResponseRedirect(sSession, STRING_COMPLETE,"SessionID"); WebUrl("http://localhost/SessionIdTest.asp", 0.0); write(sParam1); writeln; write(sSession); writeln; end TWeb;
WebRegularExpressions01.bdf