The wwRequest class' purpose is to allow your programs to receive information from the web server and the HTML page that generated a Web request. It retrieves Form and QueryString variables, Cookies and ServerVariables - it basically acts as your input source for a request.
Class Members
Member | Description | |
---|---|---|
Form |
Retrieves an HTML form variable posted to the Web server. Form variables are the primary interface for a Web client to communicate with a Web server and POST variables are the most common. Everytime a user on an HTML page fills out a form and submits it the values are POSTed to the server and can be retrieved with Request.Form("fieldname"). o.Form(lcPostKey,llNullIfNotFound) |
|
FormChecked |
A form helper function that simplifies setting HTML listvalues to server PostBack values with expressions. This function returns checked="checked" when the form value matches the provided value or an empty string if the value or form var is false.o.FormChecked(lcFormKey, lcValue, lcModelValue) |
|
FormDate |
Returns a date from a form variable by trying to convert the string date input to a date time value. Supports ISO date conversion for native type="date" and type="datetime-local" inputs as well as default locale parsing using CTOT() .o.FormDate(lcFormKey, llNullIfNotFound) |
|
FormDateOrValue |
Returns a form variable as a date on post back operations or returns the specified value on a non-POST operation or if the value is not part of the POST buffer. o.FormDateOrValue(lcFormKey, ltValue) |
|
FormOrValue |
Returns a value first by checking the Form variable in the Request buffer, and if it doesn't exist (or the request isn't POSTBACK) returning the value. o.FormOrValue(lcFormKey, lvValue) |
|
FormSelected |
A form helper function that simplifies setting HTML listvalues to server PostBack values with expressions. This function returns checked="checked" when the form value matches the provided value.o.FormSelected(lcFormKey, lcValue, lcModelValue) |
|
FormVarsToObject |
Parses an object and pulls form variables from the request buffer by matching the property names to the request variables. o.FormVarsToObject(loObject,lcPrefix,lcExcludedProperties) |
|
GetApplicationPath |
Returns the physical OS path of the virtual directory of this Web Server application. In short it maps the virtual directory defined in IIS to a physical path. Can be used as a 'base url' for Web applications to base relative URls on. o.GetApplicationPath() |
|
GetAuthenticatedUser |
Returns the name of a user if he has been authenticated by the Web server. This variable gets set and stays set once a user has entered a valid username into the browser dialog box when prompted. The username is valid for a given Web server path and down and once set cannot be unset until the browser is shut down or another authentication request is made for the same user. o.getauthenticateduser(lnMode) |
|
GetBrowser |
Returns the client's browser display name. o.getbrowser() |
|
getclientcertificate |
Returns the contents of a client Certificate's Subject key. This information contains the info about the client. The following information is provided: o.getclientcertificate(lcSubKey) |
|
GetCookie |
Returns an HTTP Cookie that was previously set. HTTP cookies allow keeping state by keeping a persistent variable on the user's browser. Cookies are sent along in each HTTP request and appear as a server variable in the incoming request data. o.getcookie(lcCookie) |
|
GetCurrentUrl |
Returns the current URL. o.getcurrenturl(llHTTPS) |
|
GetExecutablePath |
Returns the logical, Web relative path to the DLL or script. o.getexecutablepath() |
|
GetExtraHeader |
Returns a custom HTTP Header sent from the client. o.GetExtraHeader(lcHeader) |
|
GetFormMultiple |
This method retrieves multiselect HTML form variables from the CGI content file into an array. Multiselect variables can be returned when using scrolling HTML lists with the SELECT MULTIPE option or multiple radio buttons and checkboxes using the same variable name. o.getformmultiple(@taVars,tcVarname) |
|
GetFormMultipleCollection |
This method retrieves multiselect Request form variables into a collection of string values. o.GetFormMultipleCollection(tcVarname) |
|
GetFormVarCollection |
Retrieves a collection of all the form variables keys and values in the Request.Form() collection so you can iterate the variables. o.GetFormVarCollection(tcPrefix) |
|
GetHttpVerb |
Returns the HTTP verb of the request. o.GetHttpVerb() |
|
GetIPAddress |
Returns the client's IP Address. o.getipaddress() |
|
GetLocale |
Returns the currently active language in the browser if available. o.GetLocale(@laLanguages) |
|
GetLogicalPath |
Returns the web server relative path of the current request. For example: o.getlogicalpath(llProxiedPaths) |
|
GetMultipartFile |
Retrieves a single file uploaded with HTTP file upload into a binary string. o.GetMultipartFile(lcKey, @lcFileName) |
|
GetMultipartFiles |
Retrieves a collection of files that match the given form key. This method supports receiving a single file or multiple files from an < input type="file" multiple /> form control or from an AJAX upload.o.GetMultipartFiles(lcKey) |
|
GetMultipartFormVar |
Retrieves a multipart form variable from the request buffer. Multipart form variables are submitted on the client side by specifiying an encoding type of "multipart/form-data". o.GetMultipartFormVar(lcKey) |
|
GetPhysicalPath |
Returns the physical path to a script mapped page or an executable DLL file. The physical path is a great tool for capturing the system specific path of script mapped pages, so you can capture the location of the page for further parsing. o.getphysicalpath() |
|
GetPreviousUrl |
Returns the referring URL for the page when available. Essentially this returns the previous URL that was clicked or navigated to bring you to the current page. o.GetReferrer() |
|
GetQueryStringMultipleCollection |
Returns either a collection of matching key values from a query string. Use this is if you have multi-select values from a form, or you simply need to pass multiple values for a single key to a URL. o.GetQueryStringMultipleCollection(lvKey) |
|
GetRawFormData |
Returns all of the form data in raw form. o.GetRawFormData() |
|
GetRelativeSecureLink |
This method allows you to easily create a secure link simply by specifying a relative link like any other link. o.GetRelativeSecureLink(lcLink,llNonSecure) |
|
GetRequestId |
Returns the unique Request ID for the currently executing request. o.GetRequestId() |
|
GetRoutingInfo |
Returns routing info and Path Segments when dealing with extensionless URLs. o.GetRoutingInfo() |
|
GetServerName |
Returns the server's domain or IP address. Note that this value returns only the server portion of the current URL. o.GetServerName() |
|
GetServerSoftware |
Returns the software that's running the Web server. o.getserversoftware() |
|
GetUrlEncodedKeyCollection |
Allows enumerating and parsing of any Url Encoded list of values into a collection of Key and Value property objects.o.GetUrlEncodedKeyCollection(lcVars, lcPrefix) |
|
GetVirtualPath |
Retrieves the virtual path of the current request. The value is provided with leading and trailing forward slashes. o.GetVirtualPath() |
|
GetWCIniValue |
Retrieves a value from the Web Connection ISAPI/CGI configuration file. Most useful for retrieving the AdminUser value. o.getwcinivalue(lcKey, lcSection) |
|
InitializeRequest |
This method is responsible for setting up the Request object on each hit by passing in the POST data in some format and making it available to the specific Get methods. This method is fired on every Web request hit and deals with clearing out values from previous requests and then reassigning new values. o.initializerequest(lcPostData, lcTempPath) |
|
IsChecked |
Determines whether a checkbox or radio button has been checked. o.wwrequest.IsChecked(lcFormVar) |
|
IsFormVar |
Checks to see if a form variable exists in the request POST buffer. This method returns .T. if the key exists even if the value is blank. It will only return .F. if the key doesn't exist at all. If you need to check for blank you can simply read the key with wwRequest::Form(). o.IsFormVar(lcKey) |
|
islinksecure |
Checks to see if the user is coming in over the SSL port. o.IsLinkSecure(lcSecurePort) |
|
IsPostback |
Determines whether the current request is being sent via an HTTP POST operation. Useful when checking for first time display or submit handling of requests. o.IsPostback() |
|
Params |
Returns a value by checking FormVars, QueryString, Session and ViewState (in that order) for a matching key and returning the value. o.Params(lcKey) |
|
QueryString |
Returns either a single key's value from a query string, or the entire query string as a whole. o.QueryString(lvKey) |
|
ServerVariables |
Retrieves a server variable from the request data. Server variables provide information about the current request including info about the client application (browser, IP Address), the current request (server name, querystring), authentication (username, port accessing this app) and status information (Cookies, type of request) etc. o.servervariables(lcKey) |
|
SetKey |
Sets a form variable to the specified value from the existing POST data block. o.setkey(lcKey, lcValue) |
|
UnbindFormVars |
Unbinds the Request.Form object into a passed in FoxPro object, by mapping the properties of the object to form variable names. The method then uses Request.Form(field-name) to retrieve the value and stores it in each property of the object.o.UnbindFormVars(loObject, lcPrefix, lcExcludedProperties) |
|
cFormVars |
This property holds the raw POST buffer that the HTTP client submitted. | |
cpathoverride |
Actual location of the Temporary path. This path is used to override any 'physical' paths to point to the network path instead. | |
cServerVars |
This property holds the raw Server variables returned from the Web Connection DLL. This data is URLEncoded and was created by Web Connection on the fly. Every call to ServerVariables accesses this data directly to extract the appropriate server variable value. | |
lusexmlformvars |
If .T. Request.Form retrieves variables from an XML document contained in the form buffer rather than regular post variables. | |
lUtf8Encoding |
If .T. causes Request.Form() and Request.QueryString() to UTF-8 decode the returned values. | |
nPostMode |
Request property that gets set by InitializeRequest and determines what kind of Form submission is occurring. | |
oapi |
Internal wwAPI object. The object is not protected to allow persistent access to an API object through the Request.oAPI member. | |
oxml |
Internal reference to a wwXML object. This object is not protected and can be treated as a 'global' reference to a wwXML object accessible through wwRequest.oXML. |
Requirements
Assembly: wwRequest.prgSee also:
Class wwRequest | The Server Status Form | wwProcess::oRequest | wwServer::Process© West Wind Technologies, 1996-2024 • Updated: 03/28/16
Comment or report problem with topic