I have a webserver where I want to build a website.
How to set up HTTP for the "Data available"event.
I don’t want use extra files and Binary streams.
Check
- /Example Projects/Communication/Internet/
- /Example Projects/Communication/Internet/Web Server
in the example is a binary stream and a folderitem used.
Do you want something like this?
In DataAvailable
event:
dim responseData as String = "<p>Test webserver</p>"
me.Write "HTTP/1.1 200 OK" + EndOfLine.Windows
me.Write "Content-Type: text/html" + EndOfLine.Windows
me.Write "Content-Length:" + Str(responseData.Len) + EndOfLine.Windows
me.Write EndOfLine.Windows
me.Write responseData