Hello World from Visual FoxPro

This example uses low level, raw Response.Write() operations to echo back some of the server information provided by Web Connection requests. This raw output is one option for creating Web Connection apps purely using code. While useful for low level applications/data handlers and purely data driven applications, there are other higher level scripting mechanisms available to provide easier HTML editing outside of code.

Local server time is: Apr 24 @ 01:59am

This page was dynamically generated by a Visual FoxPro server that responds to the request you see in your browser's 'Location' or 'Address' line.Following are a few examples of the custom methods provided by the wwRequest class that return common settings from Web requests.

Common Request and Server Info

.GetDLLVersion() Web Connection 7.03.11 (.NET Handler)
.GetBrowser() CCBot/2.0 (https://commoncrawl.org/faq/)
.oConfig.cVersion 1.0
.GetCurrentUrl() https://www.west-wind.com/WConnect/TestPage.wwd?Name=Rick&Company=West+Wind
.GetHttpVerb() GET
.GetServerName() www.west-wind.com
.GetPhysicalPath() c:\webconnection\fox\web\TestPage.wwd
.GetLogicalPath() /WConnect/TestPage.wwd
Server Port 443 (Hint: Try this page securely with https://)
.IsLinkSecure() Yes
Server Software Microsoft-IIS/10.0 Local IP:
Authenticated User
User's Language en-US

Query String (URL Parameter) Retrieval

.QueryString() Name=Rick&Company=West+Wind
.QueryString(1) Name=Rick&Company=West Wind
.QueryString('Name') Rick
.QueryString('Company') West Wind

Client HTTP Headers

.GetExtraHeader("Accept-Encoding") gzip
.GetExtraHeader("User-Agent") CCBot/2.0 (https://commoncrawl.org/faq/)
Retrieving Form Variables
Retrieving form variables is just as easy. You can simply use the wwRequest::Form() method to retrieve any form variable as a string. Variables are decoded including long text fields and those containing control characters.

Here are the form variables captured (set only on Postback):

*** Collect form variable values into local vars