Prev | Current Page 461 | Next

L. McColl-Sylvester and F. Ponticelli

"Professional haXe and Neko"

The argument function onData() is
invoked when some data is received that is passed
as first argument, its position in the stream, and its
length. This method is commonly used to store on
the server disk the data received from an upload
operation.
redirect( url : String ) : String Redirects the request to the passed URL using the
header ???Location???.
setCookie( k : String, v : String ) Sets a new cookie with passed key and value. The
same restriction explained for setHeader() applies
here, too.
setHeader( h : String, v : String )
: Void
Adds a key - value pair of header information. If
something has already been printed to the output
and the method is invoked, an exception will be
raised.
setReturnCode( r : Int ) : Void Set the HTTP return code. The same restriction
explained for setHeader() applies here, too.
The class also provides a static variable isModNeko (default,null) : Bool that identifies if the web server is
working behind Apache (using the mod_neko library) or not.
A special note must be made about the getCwd() method because it is a common subject of confusion.


Pages:
449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473