The Context.Request object contains properties and methods available for working with the current HTTP request.
Context.Request.ApplicationRoot is the absolute physical path to the application on the server. Read Only.
Context.Request.ApplicationRootUrl is the root url to the application. This is guaranteed to end with a forward slash ("/"). Read Only.
Context.Request.A5wIncludePath is the absolute physical path to the location of the application's a5w files. Read Only
Context.Request.A5wIncludePath is the absolute physical path to the location of the application's a5w files. Read Only.
The full body of the HTTP request. This is the raw data of the request body of a POST or PUT. If the request body is text, use Context.Request.GetBodyAsText() method to get the raw data property decoded to text. This will be empty for a GET request, as a GET does not include a body. Read Only
Context.Request.ContentLength is the length of the current request's content. Read Only
Context.Request.ContentType is the MIME type of the current request's content such as text/html or application/json. Read Write.
Context.Request.Cookies is the collection of the current request's cookies. Read Only
Context.Request.Form is the collection of the current request's form variables. The collection will have 0 entries if the page making the request does not have any forms on it. Read Only.
Context.Request.Headers is the collection of the current request's HTTP headers. Read Only.
Context.Request.HeadersAsText is a CrLf() delimited list of the request's HTTP headers. Read Only.
Context.Request.Host is the value of the HTTP Host header. Read Only.
Context.Request.HttpMethod is the current request's HTTP method such as GET, POST, or HEAD. Read Only.
Context.Request.IsLocal indicates whether the current request was made on the same machine as the server. For instance, the request made by a browser was "http://localhost/index.a5w". This can be useful to add what may be sensitive diagnostic/debug information to a response knowing that it will only be added when the request was made on the same machine as the server. Read Only.
Context.Request.IsWorkingPreview will be .T. if the request is being processed in working preview. Otherwise, it is .F. Read Only.
Context.Request.Params is a single collection that includes all the items in the following collections in this order: QueryString, Form, Cookies, and ServerVariables. Read Only.
Context.Request.PhysicalPath is the physical path to the file being requested. Read Only.
Context.Request.QueryString is a collection of the current request's query string's parsed name/value pairs. To get an unparsed query string use the ToString() method: Context.Request.QueryString.ToString(). To get the "firstName" query string value from this request, "http://www.acme.com/search/?firstName=John&lastName=Doe" use the following Xbasic: Context.Request.QueryString.Get("firstName"). Read Only.
Context.Request.QueryStringAsText is the urldecoded query part of the request url. For example: CompanyName=Alpha Software&City=Burlington&State=MA
Context.Request.RawUrl is the current request's URL with the protocol and domain prefix removed. The RawUrl for a request made with this URL "http://www.acme.com/search/?firstName=John&lastName=Doe" would be "/search/?firstName=John&lastName=Doe". Read Only.
Context.Request.Referer is the value of the HTTP Referer header. Read Only
Context.Request.Remote_Addr is an alias of UserHostAddress and is provided for compatibility with Alpha Anywhere web applications that were written to run on the stand-alone server. Read Only.
Context.Request.Request_Uri is an alias of RawUrl and is provided for compatibility with Alpha Anywhere web applications that were written to run on the stand-alone server. Read Only.
Context.Request.ScriptName is an alias for the current request's PATH_INFO server variable. Read Only.
Context.Request.Script_Name is an alias for ScriptName. Read Only.
Context.Request.ServerVariables is a collection of the web server variables. The follow is a list of variables that are supported on both IIS and the stand-alone application server. When running under IIS there may be other server variables available. See the Microsoft documentation for more details.
HeaderName interpreted as-is. For example, if you specify HEADER_MY-HEADER, the server searches for a request header named MY-HEADER.
HeaderName with underscores interpreted as dashes. For example, if you specify HTTP_MY_HEADER, the server searches for a request header named MY-HEADER.
The following code is an example of how to retrieve a server variable:
Context.Request.TemporaryDirectory is the path to a temporary directory that is a unique for the request and is valid for the duration of a request. When the request is finished the directory is deleted. The directory path will always end with a back-slash ("\"). Read Only.
Context.Request.TimeoutBehavior is the setting for how a request timeout is determined. This setting allows a specific request to timeout differently than the system defined (default) timeout behavior. Use this setting if a request needs continue processing beyond a cancelled or dropped network connection or if the request process could take longer than 2 minutes. Typically requests should be processed as quickly as possible so that web server threads can be used to process other requests. Long running processing or processing that needs to be deterministic and have recoverability (restart if a resource like network, disk, or database is unavailable during processing) should be done through a workflow or other task processing subsystem. This setting is active only for the current request from the point the value is set until the value is reset or the request ends.The value may be a combination of the following values:
The Default option uses the system defined behavior which is to cancel request processing if the connection to the client is closed and to terminate a request after 2 minutes of processing.
The ClientNoLongerConnected option tracks whether the connection to the client is closed and if it is closed the request processing is terminated.
The Duration option tracks the duration of the request process. Once the duration defined by TimeoutDurationSeconds is exceeded the request processing is terminated. Use this option without the ClientNoLongerConnected option to let request processing continue even if the connection to the client is closed.
The following code is an example of how to set a request to terminate only after a 5 minute duration:
Context.Request.TimeoutBehavior = A5AS::A5INETServerIntegration::RequestTimeoutBehavior::Duration Context.Request.TimeoutDurationSeconds = 300
The following code is an example of how to set a request to terminate after a 3 minute duration or a closed client connection:
Context.Request.TimeoutBehavior = A5AS::A5INETServerIntegration::RequestTimeoutBehavior::Duration .and. A5AS::A5INETServerIntegration::RequestTimeoutBehavior::ClientNoLongerConnected Context.Request.TimeoutDurationSeconds = 180
Context.Request.TimeoutDurationSeconds is the amount of time in seconds that a request is allowed to run before it is terminated. This is used in conjunction when Context.Request.TimeoutBehavior includes the A5AS::A5INETServerIntegration::RequestTimeoutBehavior::Duration option.
Context.Request.UserAgent is the UserAgent string that is sent by the browser. Read Only
Context.Request.UserHostAddress is the IP host address of the remote client. Read Only
Context.Request.Variables. Read Only