A small web server written with PowerBASIC. Some of it's features:
|mixed url parameters||http://localhost/rnd/10?from=1&to=100|
The ext directory has some example extensions. Essentially you write an exported function with the signature:
Function ProcessRequest ( verb As String, url As String, body As String, params As String, response As String, contentType As String ) As Long
verb is the http verb
url is the matching part of the url that invoked the service
params are any parameters including url parameters.
repsonse is where you put your response value
contentType is content type i.e. text/html.
return value is the http response code. Currently valid responses are 200 ok, 400 bad request, 404 not found, 415 unsupported media. Others can be added as needed.
The files directory tree is where you put static content. You can also add or remove content here using external applications, dynamic, or built-in extensions.