https://github.com/iolanguage/cgi
https://github.com/iolanguage/cgi
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/iolanguage/cgi
- Owner: IoLanguage
- License: bsd-3-clause
- Created: 2018-03-11T11:52:22.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-06-11T15:24:51.000Z (about 8 years ago)
- Last Synced: 2025-12-29T21:26:34.008Z (6 months ago)
- Language: Io
- Size: 6.84 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# CGI
CGI supports accessing CGI parameters passed in environment variables or standard input by a web servers like Apache. Example use:
```Io
#!./ioServer
cgi = CGI clone
redirect = cgi getParameters at("redirurl")
if (redirect and redirect != "",
redirect clipAfterStartOfSeq("\r")
redirect clipAfterStartOfSeq("\n")
cgi redirect(redirect)
System exit(0)
)
cgi header("Content-type", "text/html")
cgi write("<html><head><title>test</title><body>")
cgi write("GET Parameters:")
cgi getParameters foreach(k, v,
cgi write(k .. " = " .. v .. ","))
)
cgi write("POST Parameters:")
cgi postParameters foreach(k, v,
cgi write(k .. " = " .. v .. ","))
)
cgi write("COOKIES:")
cgi cookies foreach(k, v,
cgi write(k .. " = " .. v .. ",")
)
```
# Installation
```
eerie install https://github.com/IoLanguage/CGI.git
```