Copyright 2008 Shoptalk Systems

RAW expr$

Description:

Stop execution and return the contents of expr$ as the entire web page with a MIME type of text/plain.

This is useful as a way to create a web service that can optionally take some input and produces a plain text result.  This way you can provide information or processing to others on the Internet via HTTP.

Example:

  'adder.bas
  'get a first and second number from UrlKeys$
  'expected format for UrlKey$ is "app=adder&first=number&second=number
  firstPar$ = word$(UrlKeys$, 2, "&first=")
  first = val(word$(firstPar$, 1, "="))
  secondPar$ = word$(UrlKeys$, 2, "&second=")
  second = val(word$(secondPar$, 1, "="))
  raw str$(first+second)