Skip to content
Zwetan Kjukov edited this page Jun 25, 2015 · 3 revisions

Once you have compiled index.abc

you can directly run it on the command line with redshell

$ ./redshell index.abc

for example, with the index.abc from release 0.1 you will obtain

Content-Type: text/plain; charset=utf-8

hello world

Here some HTTP headers
----------------------

That's all for now, we will show more advanced way to test the code later.

Here an illustration of what happen when you use the Gateway and catch errors

Content-Type: text/plain; charset=utf-8
Status: 500 Internal Server Error
Content-Length: 293

TypeError: Error #1034: Type Coercion failed: cannot convert "Content-Type: " to net.http.Header.
	at net.http::HttpRequest/toStringInternal()
	at net.http::HttpRequest/toString()
	at org.as3lang.www::WebSite/apply()
	at net.http.cgi::CommonGateway/run()
	at global$init()

nothing to display

If you were running this code on the server you would obtain the same message

TypeError: Error #1034
	at net.http::HttpRequest/toStringInternal()
	at net.http::HttpRequest/toString()
	at org.as3lang.www::WebSite/apply()
	at net.http.cgi::CommonGateway/run()
	at global$init()

nothing to display

here because we use the release version of redshell on a production server the error message is less detailed.

Clone this wiki locally